Inline IsTypedArray when TypedArray and non-TypedArrays were observed

RESOLVED FIXED in Firefox 56

Status

()

enhancement
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: anba, Assigned: anba)

Tracking

Trunk
mozilla56
Points:
---

Firefox Tracking Flags

(firefox56 fixed)

Details

Attachments

(1 attachment)

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
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: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.