Support loading from rope right-child in MacroAssembler::loadStringChar
Categories
(Core :: JavaScript Engine: JIT, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox105 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
Details
(Keywords: perf-alert)
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
The equivalent C++ code has an optimization for one-level deep ropes, but the JIT code only supports this for the left child. This difference can cause performance issues, for example the micro-benchmark below improves from 195 ms to 34 ms with a patch for this.
function f(s) {
var s1 = "123456789" + s;
var res;
for (var i = 0; i < 10_000_000; i++) {
res = s1.charCodeAt(11 + (i % 8));
}
return res;
}
var t = new Date;
f("foobarbaz1234567890");
print(new Date - t);
Comment 1•2 years ago
|
||
If you don't already have written a patch, bug 1382639 has a patch, but probably needs to be rebased.
Assignee | ||
Comment 2•2 years ago
|
||
Assignee | ||
Comment 3•2 years ago
|
||
(In reply to André Bargull [:anba] from comment #1)
If you don't already have written a patch, bug 1382639 has a patch, but probably needs to be rebased.
Yeah I wrote the patch earlier today. I didn't know we had this on file already :)
Comment 5•2 years ago
|
||
I just compared it against the patch from bug 1382639, but bug 1382639 was before Spectre, so it was quite outdated. :-)
Comment 7•2 years ago
|
||
bugherder |
Comment 8•2 years ago
|
||
(In reply to Pulsebot from comment #6)
Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dc047eb790a0
Support loading from rope right-child in MacroAssembler::loadStringChar.
r=anba
== Change summary for alert #35212 (as of Thu, 25 Aug 2022 13:01:15 GMT) ==
Improvements:
Ratio | Test | Platform | Options | Absolute values (old vs new) |
---|---|---|---|---|
2% | cnn loadtime | macosx1015-64-shippable-qr | bytecode-cached cold fission webrender | 1,074.62 -> 1,052.29 |
2% | cnn loadtime | macosx1015-64-shippable-qr | bytecode-cached fission warm webrender | 626.83 -> 614.17 |
For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=35212
Updated•2 years ago
|
Description
•