Closed Bug 766218 Opened 13 years ago Closed 12 years ago

IonMonkey: Make "value === boolean" fast

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jandem, Assigned: jandem)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file, 2 obsolete files)

JM has a fast path for this and we need it for V8 earley-boyer. A micro-benchmark: -- function f() { var a = [{}, true]; var res = 0; for (var i=0; i<10000000; i++) { if (a[i & 1] !== false) res += 1; } print(res); } var t = new Date; f(); print(new Date - t); -- JM+TI : 22 ms Ion : 170 ms
Attached patch Patch (obsolete) (deleted) — Splinter Review
I tried to use MCompare with different LIR instructions, but adding MCompareConstant seemed a bit simpler. The patch also has a few minor, unrelated MCompare changes. On earley-boyer, this seems to get rid of all calls to StrictlyEqual<false> (!==). There are still some stub calls left for the === in sc_assq, one of the operands there has type "int or string".
Attachment #634877 - Flags: review?(dvander)
Attached patch Patch (obsolete) (deleted) — Splinter Review
Fixes a small perf issue.
Attachment #634877 - Attachment is obsolete: true
Attachment #634877 - Flags: review?(dvander)
Attachment #634914 - Flags: review?(dvander)
This is about a 15% perf win on earley-boyer on my machine - nice! Will review tonight.
Attached patch Patch (deleted) — Splinter Review
Different approach, applies on top of bug 768027.
Attachment #634914 - Attachment is obsolete: true
Attachment #634914 - Flags: review?(dvander)
Attachment #636639 - Flags: review?(dvander)
Attachment #636639 - Flags: review?(dvander) → review+
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Depends on: 839315
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: