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
Generate a monomorphic version of .createReadOnly, .instantiate and .is for each class model
The VScode Deopt explorer showed that `.createReadOnly` inside the class model `register` function was getting deoptimized because it closes over too-wide a variety of `klass` variable references. We're closing over it so it is correct, but to v8, the callsite is still the same I guess, so it has to deoptimize to pull the right value for the closure! Same for .is and .instantiate -- these dynamically produced functions make a huge difference if they are re-eval'd for each class instead of defined dynamically.
Removing this deoptimization almost 2x'd to the large root benchmark for me!
0 commit comments