Closed Bug 1801866 Opened 2 years ago Closed 2 years ago

Optimize fromCharCode with Double inputs

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
109 Branch
Tracking Status
firefox109 --- fixed

People

(Reporter: anba, Assigned: anba)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

JetStream3 includes SunSpider's "base64" benchmark, which calls String.fromCharCode with Double inputs. Supporting this case saves 7'860'000 VM calls to String.fromCharCode in JetStream's version of base64 (cli version).

In addition to that benchmark, I've also observed calls to String.fromCharCode with Double inputs on popular web sites, for example twitch.tv.

SunSpider's base64 calls String.fromCharCode with double inputs:

String.fromCharCode( (25 * Math.random()) + 97 )

Supporting this case saves 7'860'000 calls to String.fromCharCode in JetStream's
version of base64.

Depends on D162727

Blocks: sm-opt-jits
Severity: -- → N/A
Priority: -- → P1
Pushed by andre.bargull@gmail.com: https://hg.mozilla.org/integration/autoland/rev/0300ac357f25 Inline String.fromCharCode when called with double inputs. r=jandem
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: