-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix inline caching deoptimization #21
Conversation
@Uzlopak Can you pull latest master into this branch before running benchmark? |
Actually this benchmark is not representative. Will open an Issue. |
@Uzlopak Actually, I'm not sure we need all of this change, the way I read the report, it is unhappy due to ev being initialized as undefined and then changed into a string, and then being used as a key. Can you replace it just with a new const variable and see if that also addresses the cache deoptimization? |
However, your approach still should be more efficient, as it replaces monomorphic variable with just a constant, which should be more predictable. Let's go with your implementation. |
Can we drop |
I removed the ev instantiation :) |
According to deoptigate, there are two inline caching issues.
This one fixes one of them.
Checklist
npm run test
andnpm run benchmark
and the Code of conduct