Closed Bug 1861926 Opened 2 years ago Closed 2 years ago

Improve relational comparison of single character strings

Categories

(Core :: JavaScript Engine: JIT, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
121 Branch
Tracking Status
firefox121 --- fixed

People

(Reporter: anba, Assigned: anba)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

The existing optimisations for string relational comparison only handle the case when the string operand is known to be a single-element string, cf. MCompare::tryFoldCharCompare. When also supporting the case of variable length strings, we can save ~1.2M calls to jit::StringsCompare in JetStream's pdfjs benchmark.

MCompare::foldsTo only handles the case when the non-constant operand is known
to be a single element string. With this additional optimisation we save ~1.2M
calls to jit::StringsCompare in JetStream's pdfjs benchmark.

Both pop instructions are unreachable.

Depends on D192186

Blocks: sm-opt-jits
Severity: -- → N/A
Priority: -- → P1
Pushed by andre.bargull@gmail.com: https://hg.mozilla.org/integration/autoland/rev/6180a35c756b Part 1: Improve relational comparison for character strings. r=jandem https://hg.mozilla.org/integration/autoland/rev/4dc147bb81e8 Part 2: Remove unnecessary pop instructions. r=jandem
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch
Regressions: 1947140
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: