Closed
Bug 813727
Opened 12 years ago
Closed 5 years ago
IonMonkey: Implement atom inequalities.
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 813836
People
(Reporter: zbraniecki, Unassigned)
Details
Attachments
(1 file)
767 bytes,
text/html
|
Details |
when iterating over string and doing character comparison the JS engine is two times slower than V8.
Comment 1•12 years ago
|
||
v8 generates code for character compares. We only have one very simple optimization for ==/!=. Which checks for ptr==ptr, atoms and string length. I think optimizing this very case could be simple. Last time I tried implementing a whole string compare path everything got very ugly, because of register pressure.
Comment 2•12 years ago
|
||
The problem is that IonMonkey does not yet provide a fast path for atom inequalities (see MCompare::infer in ion/MIR.cpp), so currently the result of charAt returns another atom which is boxed and pushed twice to call into a VM function which unbox its operands and compare the atoms. Note: x2 times slower does not seems too bad knowing the overhead of VM function calls, both in terms of spilling and it terms of number of instructions.
Summary: V8 is x2 faster than Spidermonkey on character comparison → IonMonkey: Implement atom inequalities.
Assignee | ||
Updated•10 years ago
|
Assignee: general → nobody
Comment 3•5 years ago
|
||
Fixed through bug 813836.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•