3 ms·
Optimizing JavaScript is hard. v8 for instance, has the interpreter (ignition), and optimizing compiler (turbofan), that have a lot of undocumented behavior th
by partycoder 8y ago
Optimizing JavaScript is hard.
v8 for instance, has the interpreter (ignition), and optimizing compiler (turbofan), that have a lot of undocumented behavior that people just to try to probe via microbenchmarks.
- https://en.wikipedia.org/wiki/Inline_caching https://en.wikipedia.org/wiki/Inline_caching
- https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/43823.pdf https://static.googleusercontent.com/media/research.google.c...
If you want to understand what is going on the only way is to read v8's source code or running a profiler.
For example, did you know that touching the prototype of a RegExp object makes it slow? You had no way of knowing that.