Closed Bug 1859306 Opened 2 years ago Closed 2 years ago

Optimize calls to EqualStringsHelperPure

Categories

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

task

Tracking

()

RESOLVED FIXED
120 Branch
Tracking Status
firefox120 --- fixed

People

(Reporter: jandem, Assigned: anba)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [sp3])

Attachments

(2 files)

This is called a few million times on Speedometer 3, almost always with a non-rope string.

At least in Ion we should be able to do much better. Because we know the JSAtom* we can inline the character comparison for short-ish atoms, similar to what we do with LCompareSInline.

Blocks: sm-opt-jits
Severity: -- → N/A
Priority: -- → P1

Move CompareCharacters into MacroAssembler and split it into three methods:

  • loadStringCharsForCompare() loads the string characters in preparation for
    the comparison. LCompareSInline and LStringStartsWithInline directly pass
    the string characters to compareStringChars. LStringEndsWithInline first
    moves the pointer to the suffix string.
  • compareStringChars() and branchIfNotStringCharsEquals() perform the actual
    comparison. Atom comparison in part 2 will only use branchIfNotStringCharsEquals().
Assignee: nobody → andrebargull
Status: NEW → ASSIGNED

Compare short atoms using the new branchIfNotStringCharsEquals() method
from part 1.

Depends on D191268

Pushed by andre.bargull@gmail.com: https://hg.mozilla.org/integration/autoland/rev/563f37a40f9b Part 1: Move string character comparison methods into MacroAssembler. r=jandem https://hg.mozilla.org/integration/autoland/rev/179a0f04f520 Part 2: Compare short atoms using inline assembly. r=jandem
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: