EmberJS-TodoMVC spends a lot more time in removeListenerFrom doing array splicing than in V8
Categories
(Core :: JavaScript Engine, task, P2)
Tracking
()
People
(Reporter: mstange, Unassigned)
References
(Blocks 1 open bug)
Details
In the function removeFromListener
in the EmberJS-TodoMVC benchmark, we spend 3080 samples inside Array.prototype.splice
versus V8's 739 samples.
To reproduce, run index.js
inside https://github.com/mozilla/Speedometer/tree/ab0e3b8406bbc0356244f8cd430900e9a346737b/resources/todomvc/architecture-examples/emberjs/dist in the JS shell.
Profiles (focused on removeFromListener
's "JS-only self time"):
Spidermonkey: https://share.firefox.dev/3mGyBXK
V8: https://share.firefox.dev/3ylHwR0
Updated•2 years ago
|
Comment 1•2 years ago
|
||
splice
is a very complicated builtin. We probably want to carve out some fast paths with CacheIR based on the number of arguments, for example I think this is called with two arguments and the return value is unused, so we should be able to use a faster VM function for that case.
Reporter | ||
Comment 2•2 years ago
|
||
I've updated the V8 profile link (the previous one had incorrect data because we hadn't turned off inlining) and now the numbers are 2080 vs 739.
Updated•2 years ago
|
Comment 3•2 years ago
|
||
EmberJS has been removed from sp3. Does the issue show up in other tests?
Reporter | ||
Comment 4•2 years ago
|
||
I have not seen Array.prototype.splice
show up majorly in profiles of the other sp3 subtests.
Comment 5•2 years ago
|
||
For future reference, the ember and ember debug tests can be run at https://6480ea230b807c000893c43c--speedometer-preview.netlify.app/?suites=TodoMVC-Ember,TodoMVC-Ember-Debug#running
Updated•2 years ago
|
Description
•