maybeGet* calls for builtin protos in CacheIR.cpp can cause performance issues
Categories
(Core :: JavaScript Engine: JIT, task, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox119 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [sp3])
Attachments
(1 file)
There are a few places in CacheIR.cpp where we attach a stub only if the global already has a certain builtin prototype object. This can cause a performance cliff especially with eager baseline interpreter/jit use (where I noticed this when looking into a fuzz bug).
Fixing this improves the micro-benchmark below from 50 ms to 13 ms for me.
function g() {}
function f() {
var t = new Date;
var arr = [1, 2, 3];
for (var i = 0; i < 10_00_000; i++) {
if (i > 20) {
g(...arr);
}
}
print(new Date - t);
}
f();
| Assignee | ||
Comment 1•2 years ago
|
||
This fixes a performance cliff in some cases where we'd attach a slower stub instead.
This could happen with spread calls for example.
Updated•2 years ago
|
Comment 3•2 years ago
|
||
| bugherder | ||
Comment 4•2 years ago
|
||
This may have lead to a small improvement on AWFY-speedometer2-React-Redux-TodoMVC* tests : https://treeherder.mozilla.org/perfherder/graphs?highlightAlerts=1&highlightChangelogData=1&highlightCommonAlerts=0&selected=3912918,1754792126&series=mozilla-central,3735873,1,13&series=autoland,3912918,1,13&timerange=5184000&zoom=1694444285255,1694658645474,56.8046541887128,65.99355599102117
| Assignee | ||
Comment 5•2 years ago
|
||
Oh nice, thanks for checking. I wasn't expecting this to be a measurable win on SP3, but good to see it maybe showed up anyway :)
Updated•2 years ago
|
Description
•