Last Comment Bug 729725 - IonMonkey: MTruncateToInt32 should support constant folding
: IonMonkey: MTruncateToInt32 should support constant folding
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All Linux
: -- normal (vote)
: ---
Assigned To: general
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-22 14:50 PST by Marty Rosenberg [:mjrosenb]
Modified: 2012-07-27 17:03 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
/home/mrosenberg/patches/foldTruncateToInt-r0.patch (1.60 KB, patch)
2012-02-22 14:50 PST, Marty Rosenberg [:mjrosenb]
sstangl: review+
Details | Diff | Splinter Review

Description Marty Rosenberg [:mjrosenb] 2012-02-22 14:50:48 PST
Created attachment 599782 [details] [diff] [review]
/home/mrosenberg/patches/foldTruncateToInt-r0.patch

If you have |x & 0xffffffff|, 0xffffffff is encoded as 4294967295.0 (the double), then is converted to -1 (the integer) at runtime, every time the constant is needed.

This speeds up nsieve by 11%, and md5 by 17% (on ARM)
It probably has similar benefits on x86 and x64.
Comment 1 Marty Rosenberg [:mjrosenb] 2012-07-27 17:03:54 PDT
landed: http://hg.mozilla.org/projects/ionmonkey/rev/3436c259fb42

Note You need to log in before you can comment on or make changes to this bug.