Uh oh!
There was an error while loading. Please reload this page.
Dynamic generic dictionary expansion feature - #32270
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
jkotas
commented
Feb 14, 2020
Overall, I like this much better than the original version. Thanks! |
fadimounir
commented
Feb 14, 2020
Couple of interesting benchmark numbers I tried:
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
c2564a9 to
a2467cbCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
1) Separate dictionary layout expansion from dictionary expansions on types and methods 2) Dictionary expansions on types and methods done on-demand, after size checks by codegen (uses new JIT feature) 3) Update dependency tracking to only track derived types of base types with dictionaries 4) Update the R2R dictionary access stubs to perform size checks (and major cleanup there) 5) Fix loader allocator issue with the dependency tracking (bug in original implementation) 6) Add unit test 7) Update documentation
Update JIT interface guid
e884297 to
447ea44CompareUh oh!
There was an error while loading. Please reload this page.
This reverts commit 7182559.
…otnet#33310) This reverts commit 7182559. (cherry picked from commit dca3429)
TODO:
These changes introduce dynamic size expansion for generic dictionary layouts when we run out of slots.
The original implementation allowed for an expansion, but using a linked list structure, which made it
impossible to use fast lookup slots once we're out of slots in the first bucket.
This new implementation allows for the usage of fast lookup slots always, for all generic lookups.
This also removes the constraint we had on R2R, where we disabled the usage of fast slots all-together.
NOTE:
This is a much simpler implementation than the original commit which got reverted due to failures related to collectible assemblies (dotnet/coreclr#26262). The difference between these changes and the original ones is that dictionary expansion for types and methods is now done lazily, on-demand, whenever we attempt to read a value beyond the size of a given dictionary. This makes uses of the newly added JIT support from #31957. The bug with collectible assemblies have been also fixed, and I added a test to cover various interesting aspects of the feature.
BONUS:
Part of these changes is some cleanup work to really simplify the R2R dictionary access stubs. These stubs are now much more compact with fewer instructions and better registry usage (many #ifdef UNIX_AMD64_ABI blocks removed from the amd64 stub)
cc @dotnet/crossgen-contrib