Closed
Bug 728940
Opened 13 years ago
Closed 13 years ago
IonMonkey: Make comparisons against null/undefined fast
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: jandem, Assigned: jandem)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
18.72 KB,
patch
|
dvander
:
review+
|
Details | Diff | Splinter Review |
We need this for v8-richards and some other benchmarks.
Assignee | ||
Comment 1•13 years ago
|
||
Improves v8-richards from 2950 to 4280 points. Still slower than JM and JM+TI though.
Attachment #599133 -
Flags: review?(dvander)
Comment on attachment 599133 [details] [diff] [review]
Patch
Review of attachment 599133 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/ion/IonBuilder.cpp
@@ +2561,5 @@
> + TypeOracle::Binary b = oracle->binaryOp(script, pc);
> + if (IsNullOrUndefined(b.lhs))
> + return jsop_compare_null_undefined(op, b.lhs, right, left);
> + if (IsNullOrUndefined(b.rhs))
> + return jsop_compare_null_undefined(op, b.rhs, left, right);
Could this code (including the arg swapping, though that could done in lowering like add+const) be moved to MCompare::infer instead?
Attachment #599133 -
Flags: review?(dvander) → review+
Assignee | ||
Comment 3•13 years ago
|
||
(In reply to David Anderson [:dvander] from comment #2)
>
> Could this code (including the arg swapping, though that could done in
> lowering like add+const) be moved to MCompare::infer instead?
The problem with doing this in lowering is that we don't always know which operand is null/undefined (since it may be boxed). So I changed it to swap the arguments in MCompare::infer.
https://hg.mozilla.org/projects/ionmonkey/rev/5a04fd69aa09
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•