Closed Bug 1381891 Opened 3 years ago Closed 3 years ago

Inline IsTypedArray when TypedArray and non-TypedArrays were observed

Categories

(Core :: JavaScript Engine: JIT, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: anba, Assigned: anba)

References

Details

Attachments

(1 file)

Improves this benchmark from 660ms to 380ms for me

    var a = Array(100).fill(0).map((v, k) => k + 1);
    var ta = new Int32Array(100).map((v, k) => k + 1);
    var q = 0;
    var t = Date.now();
    for (var i = 0; i < 100000; ++i) {
        for (var x of a) q += x;
        for (var x of ta) q += x;
    }
    print(Date.now() - t, q);
Assignee: nobody → andrebargull
Status: NEW → ASSIGNED
Attached patch bug1381891.patchSplinter Review
Is possible to inline IsTypedArray using approach?
Attachment #8887544 - Flags: review?(jdemooij)
Duplicate of this bug: 1115545
Comment on attachment 8887544 [details] [diff] [review]
bug1381891.patch

Review of attachment 8887544 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM!
Attachment #8887544 - Flags: review?(jdemooij) → review+
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8e46fc907da9
Inline IsTypedArray even when non-TypedArrays were observed. r=jandem
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/8e46fc907da9
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.