Closed
Bug 608823
Opened 14 years ago
Closed 13 years ago
JM: "x & double" is slow
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: jandem, Assigned: evilpie)
References
Details
(Keywords: perf, Whiteboard: [fixed-in-tracemonkey][jsperf])
Attachments
(2 files, 2 obsolete files)
288 bytes,
application/x-javascript
|
Details | |
30.61 KB,
patch
|
dvander
:
review+
|
Details | Diff | Splinter Review |
For code like x & 0xffffffff JM is very slow. It does a stub call and spends a lot of time converting that double constant to int32. For the attached test case I get these numbers:
-m: 339, 3926 (> 11x slower)
-j: 221, 185 (first is always faster, seems unrelated)
Updated•14 years ago
|
Whiteboard: [jsperf]
Assignee | ||
Updated•14 years ago
|
Assignee: general → evilpies
Assignee | ||
Comment 1•14 years ago
|
||
This patches makes bitop use tryBinaryConstantFold, and therefor extends this function.
I also changed it in a manner every primitive constant is handled like an normal integer value.
Assignee | ||
Comment 2•14 years ago
|
||
Attachment #487682 -
Attachment is obsolete: true
Attachment #495483 -
Flags: review?(dvander)
Comment on attachment 495483 [details] [diff] [review]
Bitop with constant primitives
Looks good, I'll r+ this with some tests :) if you need help writing them or getting them into the harness, just give a shout in #jsapi
Assignee | ||
Comment 4•14 years ago
|
||
Attachment #495483 -
Attachment is obsolete: true
Attachment #495483 -
Flags: review?(dvander)
Assignee | ||
Updated•14 years ago
|
Attachment #498126 -
Flags: review?(dvander)
Comment on attachment 498126 [details] [diff] [review]
Bitop with constant primitives
I am totally sorry about the lateness of this review. I suck. Patch looks great, and thanks for the tests!
Attachment #498126 -
Flags: review?(dvander) → review+
Updated•14 years ago
|
Keywords: checkin-needed
Comment 6•13 years ago
|
||
Keywords: checkin-needed
Whiteboard: [jsperf] → [fixed-in-tracemonkey][jsperf]
Comment 7•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•