3 ms·
The author points to V8 optimization : > But if V8 thinks that the code is “too tricky”, it keeps it in slow but dynamic form. The next paragraph shows what c
by pascalmahe 11y ago
The author points to V8 optimization :
> But if V8 thinks that the code is “too tricky”, it keeps it in slow but dynamic form.
The next paragraph shows what caused V8 to not optimize :
> For example, in the first set of changes I’ve used a global variable defined outside of the class, so it had an external state. In the second one, I’ve changed the class structure on the fly. As a result, V8 did not compile it to effective typed native code.
But you're right, saying "it's probably that" is not the same thing as delving in the code.