Inline Number.prototype.toString when an explicit base argument is present
Categories
(Core :: JavaScript Engine: JIT, enhancement, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox109 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
References
(Blocks 1 open bug)
Details
Attachments
(5 files)
Number.prototype.toString
is currently only inlined when no base
argument is present. Supporting the case when base
is present saves about 2'300'000 VM calls in JetStream2 (most calls are from the "string-unpack-code-SP" sub-benchmark) and 950'000 calls in Speedometer2.
Assignee | ||
Comment 1•2 years ago
|
||
The next part adds a new cpp-file, which changes unified bundles. Without this
change we'll then get a "visibility does not match previous declaratio" error.
Depends on D163093
Assignee | ||
Comment 2•2 years ago
|
||
This makes it easier to reuse this struct
in part 4.
Depends on D163094
Assignee | ||
Comment 3•2 years ago
|
||
Add unsigned, high-word, 32-bit multiplication in preparation for the next part.
Depends on D163095
Assignee | ||
Comment 4•2 years ago
|
||
A constant base argument is the most common case, so optimise this case even further.
Depends on D163096
Assignee | ||
Comment 5•2 years ago
|
||
Supporting this case saves about 2'300'000 VM calls in JetStream2 and
950'000 VM calls in Speedometer2.
The new Int32ToStringWithBaseResult
CacheIR op is transpiled into the two MIR
instructions MGuardInt32Range
and MInt32ToStringWithBase
. In most cases the
base
argument is a constant, which enables to fold MGuardInt32Range
away and
also allows to make MInt32ToStringWithBase
a non-guard instruction.
Depends on D163097
Comment 7•2 years ago
|
||
Backed out 12 changesets (Bug 1802497, Bug 815255, Bug 1802496, Bug 1802495) for causing build bustage in ReciprocalMulConstants.cpp CLOSED TREE
Log: https://treeherder.mozilla.org/logviewer?job_id=398027201&repo=autoland&lineNumber=9040
Backout: https://hg.mozilla.org/integration/autoland/rev/878800f6a93271d6bf467be334c30932b7d1df04
Assignee | ||
Comment 8•2 years ago
|
||
Thanks. Just a simple unified build issue.
Updated•2 years ago
|
Comment 10•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a03d2f77f487
https://hg.mozilla.org/mozilla-central/rev/cb0c2d593207
https://hg.mozilla.org/mozilla-central/rev/9d73d3ace1c9
https://hg.mozilla.org/mozilla-central/rev/b82f4d2c161d
https://hg.mozilla.org/mozilla-central/rev/1c95cd727056
Description
•