Closed
Bug 766218
Opened 13 years ago
Closed 12 years ago
IonMonkey: Make "value === boolean" fast
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: jandem, Assigned: jandem)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
dvander
:
review+
|
Details | Diff | Splinter Review |
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
Assignee | ||
Comment 1•13 years ago
|
||
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)
Assignee | ||
Comment 2•13 years ago
|
||
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.
Assignee | ||
Comment 4•12 years ago
|
||
Different approach, applies on top of bug 768027.
Attachment #634914 -
Attachment is obsolete: true
Attachment #634914 -
Flags: review?(dvander)
Attachment #636639 -
Flags: review?(dvander)
Updated•12 years ago
|
Attachment #636639 -
Flags: review?(dvander) → review+
Assignee | ||
Comment 5•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•