Skip to content
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

What does optimizable state means under optimization state? #28

Open
kaushik143 opened this issue Mar 24, 2021 · 1 comment
Open

What does optimizable state means under optimization state? #28

kaushik143 opened this issue Mar 24, 2021 · 1 comment

Comments

@kaushik143
Copy link

kaushik143 commented Mar 24, 2021

I am using deoptigate to find out bottlenecks for my node application and I see a lot of functions in an optimizable state but I don't understand if this is a bottleneck or not. Since I expect the function to be in an optimized state if it is not a bottleneck.

Attaching screenshot for optimizable state
Screenshot 2021-03-24 at 5 25 58 PM

Similarly, under inline-cache grouping, I see dynamic key access as megamorphism but that also I am not sure if it is bottleneck. Here is the definition of function const getResponseHeaders = (▲response, key) => response[☎'_headers'][☎key]; It shows problem at '_headers' and 'key' and key here is string which get 2 different values

Please help me understand properly that How to use this in a better way. I read this blog multiple times and it is really helpful in the case of deoptimization but nothing is mention for these two 2 other grouping.

@jolindroth
Copy link

Optimizable means that the function can be optimized, but the compiler has not yet found it worthwhile to optimize the method. It is not a bottleneck. However, if you have megamorphic property access sites then you should look into if you can avoid mutating the properties of the input object. That property will be unnecessarily slow to access.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants