You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have been running with the reified instance variable logic for some time, which picks from among a fixed set of "right-shaped" object subtypes that use Java fields instead of instance variables for the first N ivars. However we want to improve and expand this logic as follows:
The subtypes should be generated at runtime. Some set may be pre-generated for the jar to avoid having as much type churn.
For Decreased performance between JRuby 1.7 and 9.1 #3973 and others we found issues trying to do both reify.variables and reify.classes, the latter of which generates the native Java class name according to the Ruby name for better profiling. That logic should be rolled into the generation of reified variable classes, perhaps with the flag if we are concerned about the load of N generated classes for N Ruby classes instantiated in the system.
This work should proceed in tandem with explorations into Graal JIT's partial escape analysis, which will work better if we can avoid the extra indirection through the instance variable table.
The text was updated successfully, but these errors were encountered:
The first part of this has been implemented for 9.2.1.0: all reified variable classes are now generated at runtime, allowing us to scale them to any size. None are pre-generated yet, but that may come later; the cost is rather low, since early execution will generate only a handful of classes and reuse them for many objects.
Extensive discussion about the second half of this issue is available in #5266, so I am removing that from this issue and we can call this one resolved. I will also file a separate issue for pregenerating some of the reified variable subclasses.
headius
changed the title
Generate right-shaped object subclasses and apply reify.classes naming
Generate right-shaped object subclasses
Oct 11, 2018
We have been running with the reified instance variable logic for some time, which picks from among a fixed set of "right-shaped" object subtypes that use Java fields instead of instance variables for the first N ivars. However we want to improve and expand this logic as follows:
This work should proceed in tandem with explorations into Graal JIT's partial escape analysis, which will work better if we can avoid the extra indirection through the instance variable table.
The text was updated successfully, but these errors were encountered: