Add support for relational string comparison to Ion and CacheIR
Categories
(Core :: JavaScript Engine: JIT, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
Add support for relational string comparison to Ion and CacheIR, so that we don't fall back into the slower MCompare::Compare_Unknown
case.
This improves the µ-benchmark from bug 1502882 when the str_cmp_full
comparator function is used from 13.8ms to 6.2ms for me.
Assignee | ||
Comment 1•5 years ago
|
||
Add jit::StringsCompare to call js::CompareStrings, mirroring the existing
jit::StringsEqual and js::EqualStrings pair for equality comparison. JSOP_LE
and JSOP_GT are implemented by pushing the operands in reverse order and then
calling jit::StringsCompare for JSOP_LT resp. JSOP_GE. This avoids creating
four different VMFunction wrappers and also matches how the ECMAScript spec
defines relational comparison evaluation.
ion/compare-string.js
- Add relational comparison operators.
- Ensure string rope tests are actually using ropes.
- Lower iteration count to reduce time needed to complete test for --tbpl configuration.
Assignee | ||
Comment 2•5 years ago
|
||
Depends on D24706
Assignee | ||
Comment 3•5 years ago
|
||
Depends on D24707
Assignee | ||
Comment 4•5 years ago
|
||
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=bfe385b26f475d7eca5dcfba7bb7f1abfa58a01b
Pushed by ccoroiu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/998ea689fe14
Part 1: Support relational string comparison in Ion. r=mgaudet
https://hg.mozilla.org/integration/autoland/rev/e30a80c7854f
Part 2: Support relational string comparison in CacheIR. r=mgaudet
https://hg.mozilla.org/integration/autoland/rev/3697baa32253
Part 3: Change bool template parameter to bool enum class. r=mgaudet
Comment 6•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/998ea689fe14
https://hg.mozilla.org/mozilla-central/rev/e30a80c7854f
https://hg.mozilla.org/mozilla-central/rev/3697baa32253
Comment 7•5 years ago
|
||
https://hg.mozilla.org/projects/ash/rev/998ea689fe149c52983e32af9e7cf50a8cc95c37 Bug 1538692 - Part 1: Support relational string comparison in Ion. r=mgaudet https://hg.mozilla.org/projects/ash/rev/e30a80c7854ff12c5c792a10402eed2d4d30c56e Bug 1538692 - Part 2: Support relational string comparison in CacheIR. r=mgaudet https://hg.mozilla.org/projects/ash/rev/3697baa3225394badb3c53571f4d5870ed002385 Bug 1538692 - Part 3: Change bool template parameter to bool enum class. r=mgaudet
Description
•