Closed Bug 1671960 Opened 1 year ago Closed 1 year ago

Add fast-path of AtomizeChars in ParserAtomEntry::toJSAtom

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: arai, Assigned: tcampbell)

References

Details

Attachments

(1 file, 1 obsolete file)

ParserAtoms has the same static strings as JSAtoms,
and ParserAtomEntry::toJSAtom handles them separately before AtomizeChars.
we don't have to lookup static string on JSAtom side.

Attachment #9182741 - Attachment is obsolete: true
Assignee: arai.unmht → tcampbell
Summary: Skip static string lookup in AtomizeChars in ParserAtomEntry::toJSAtom → Add fast-path of AtomizeChars in ParserAtomEntry::toJSAtom

Since we use the same HashString for both types of atoms, we can save some
time while converting between them by reusing the HashNumber. This is
beneficial for Stencil-XDR where decoding times are quite fast and handling
atoms is a noticeable delay.

We discovered that the since JSAtom uses static-strings for more cases than ParserAtoms, we still need the static strings code. I am repurposing this bug to instead pass the HashNumber to the special AtomizeChars call.

Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/aaedffcfb8a1
Forward HashNumber from ParserAtom to JSAtom. r=arai
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
You need to log in before you can comment on or make changes to this bug.