Closed Bug 608823 Opened 14 years ago Closed 13 years ago

JM: "x & double" is slow

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jandem, Assigned: evilpie)

References

Details

(Keywords: perf, Whiteboard: [fixed-in-tracemonkey][jsperf])

Attachments

(2 files, 2 obsolete files)

Attached file Test case
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)
Whiteboard: [jsperf]
Assignee: general → evilpies
Attached patch WIP 1 (obsolete) — Splinter Review
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.
Blocks: 609212
Attached patch Bitop with constant primitives (obsolete) — Splinter Review
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
Attachment #495483 - Attachment is obsolete: true
Attachment #495483 - Flags: review?(dvander)
Attachment #498126 - Flags: review?(dvander)
Keywords: perf
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+
Keywords: checkin-needed
Whiteboard: [jsperf] → [fixed-in-tracemonkey][jsperf]
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.

Attachment

General

Created:
Updated:
Size: