Improve CacheIR support for null/undefined/bool for unary/binary arithmetic ops
Categories
(Core :: JavaScript Engine: JIT, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox98 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
(Blocks 1 open bug)
Details
(Keywords: perf)
Attachments
(7 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
I have some patches that improve the micro-benchmark below from 580 ms to 9 ms locally.
Based on the profile there, this might help bug 1745639. These types also show up a number of times while browsing various websites.
function f(a, b) {
var res = 0;
for (var i = 0; i < 10_000_000; i++) {
res = (a + i) + -b;
}
return res;
}
var t = new Date;
f(null, undefined);
print(new Date - t);
Assignee | ||
Comment 1•4 months ago
|
||
This is similar to the Int64 stub fields we already support.
Assignee | ||
Comment 2•4 months ago
|
||
Depends on D137120
Assignee | ||
Comment 3•4 months ago
|
||
It's straight-forward to support null here in addition to int32 and boolean.
Depends on D137121
Assignee | ||
Comment 4•4 months ago
|
||
Depends on D137122
Assignee | ||
Comment 5•4 months ago
|
||
Depends on D137123
Assignee | ||
Comment 6•4 months ago
|
||
Depends on D137124
Assignee | ||
Comment 7•4 months ago
|
||
Depends on D137125
Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b2931a447f7e part 1 - Add support for CacheIR stub fields storing a double. r=iain https://hg.mozilla.org/integration/autoland/rev/afb4a471cd8f part 2 - Add LoadDoubleConstant CacheIR instruction. r=iain https://hg.mozilla.org/integration/autoland/rev/b564ab08d861 part 3 - Optimize null operand for binary arithmetic ops with int32 result. r=iain https://hg.mozilla.org/integration/autoland/rev/6bb50e480f6c part 4 - Optimize boolean or null operand for unary arithmetic ops with int32 result. r=iain https://hg.mozilla.org/integration/autoland/rev/aae92d923cca part 5 - Optimize null/undefined/boolean operands for binary arithmetic ops with double result. r=iain https://hg.mozilla.org/integration/autoland/rev/cd1d702f97b1 part 6 - Optimize null/undefined/boolean operands for unary arithmetic ops with double result. r=iain https://hg.mozilla.org/integration/autoland/rev/1d6c7a604dd6 part 7 - Add tests. r=iain
Comment 9•4 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b2931a447f7e
https://hg.mozilla.org/mozilla-central/rev/afb4a471cd8f
https://hg.mozilla.org/mozilla-central/rev/b564ab08d861
https://hg.mozilla.org/mozilla-central/rev/6bb50e480f6c
https://hg.mozilla.org/mozilla-central/rev/aae92d923cca
https://hg.mozilla.org/mozilla-central/rev/cd1d702f97b1
https://hg.mozilla.org/mozilla-central/rev/1d6c7a604dd6
Description
•