2 ms·
Maybe you're hitting the same slow path in Firefox than this benchmark (see [1]). I used to work on an app that was 5 to 10 times slower in v8 than in SpiderMo
by littlestymaar 9y ago
Maybe you're hitting the same slow path in Firefox than this benchmark (see [1]).
I used to work on an app that was 5 to 10 times slower in v8 than in SpiderMonkey, was it a proof that v8 was slower than SpiderMonkey ? No, we were actually falling in a v8 slow path (using exceptions in a hot section of the code because babel was transpilling `for of` loops to something that used exceptions), after some profiling we found the culprit and fixed it.
When you hit a 5x differences in JavaScript speed, it's almost never a browser performance difference, it's a bug in this specific browser : you're probably hitting a slow paths in this engine and you can probably work around it (or report a bug and wait until they fix it).
[1]: https://news.ycombinator.com/item?id=14495275 https://news.ycombinator.com/item?id=14495275