Closed
Bug 1453922
Opened 7 years ago
Closed 7 years ago
Add int32 values inline for ToIndex
Categories
(Core :: JavaScript Engine, enhancement)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla61
Tracking | Status | |
---|---|---|
firefox61 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
anba
:
review+
|
Details | Diff | Splinter Review |
While working on bug 1453809, I've noticed that ToIndex <https://searchfox.org/mozilla-central/rev/9f3da81290054c5b8955bb67ff98cae66676f745/js/src/jsnum.h#273,276> doesn't have a fast path for int32 values. (The other ToIntxyz or ToInteger functions all handle int32 values in the inline part.)
Assignee | ||
Comment 1•7 years ago
|
||
The patch improves this DataView µ-benchmark from 330ms to 250ms for me:
---
function f() {
var dv = new DataView(new ArrayBuffer(8));
var t = dateNow();
for (var i = 0; i < 10000000; ++i) {
dv.getInt32(0, true);
}
print(dateNow() - t);
}
---
Attachment #8967682 -
Flags: review?(jdemooij)
Comment 2•7 years ago
|
||
Comment on attachment 8967682 [details] [diff] [review]
bug1453922.patch
Review of attachment 8967682 [details] [diff] [review]:
-----------------------------------------------------------------
Nice, thanks!
Attachment #8967682 -
Flags: review?(jdemooij) → review+
Assignee | ||
Comment 3•7 years ago
|
||
Rebased patch to apply cleanly on inbound, carrying r+.
Attachment #8967682 -
Attachment is obsolete: true
Attachment #8969195 -
Flags: review+
Assignee | ||
Comment 4•7 years ago
|
||
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e5ced494b999957fcf4a35e7c7e605683de542bd
Keywords: checkin-needed
Pushed by nerli@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/363cc3b4dd41
Add fast path for non-negative int32 values to ToIndex. r=jandem
Keywords: checkin-needed
Comment 6•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in
before you can comment on or make changes to this bug.
Description
•