Optimize Function.prototype.bind more
Categories
(Core :: JavaScript Engine: JIT, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox112 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
(Blocks 1 open bug)
Details
(Whiteboard: [sp3])
Attachments
(2 files)
React-TodoMVC allocates so many bound functions that it's worth adding a more specialized IC stub that lets us create a bound function without calling into C++. This improves React-TodoMVC by 3-4%.
Assignee | ||
Comment 1•2 years ago
|
||
This frees up the name NewBoundFunction
for the next patch.
Assignee | ||
Comment 2•2 years ago
|
||
This specializes bind
more for the target object. This way we can do everything
in JIT code without having to call into C++.
We initialize the name/length/flags slots of the template object and then at
runtime we only have to copy the template object and store the target and bound
this/arguments, after guarding the target's name/length properties are what we expect.
This improves Speedometer's React-TodoMVC by at least 3-4% because it creates many
bound functions (the target is also a bound function in this case).
Depends on D171866
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 4•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/cfd54c278717
https://hg.mozilla.org/mozilla-central/rev/5f892b0237f0
Description
•