Last Comment Bug 775680 - Math.pow should use powi if the second argument is an integer-valued double
: Math.pow should use powi if the second argument is an integer-valued double
Status: RESOLVED FIXED
[js:t]
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla17
Assigned To: Jan de Mooij [:jandem]
: general
: Jason Orendorff [:jorendorff]
Mentors:
Depends on:
Blocks: 768745
  Show dependency treegraph
 
Reported: 2012-07-19 11:45 PDT by Jan de Mooij [:jandem]
Modified: 2012-07-20 21:06 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (848 bytes, patch)
2012-07-19 11:45 PDT, Jan de Mooij [:jandem]
dvander: review+
Details | Diff | Splinter Review

Description Jan de Mooij [:jandem] 2012-07-19 11:45:32 PDT
Created attachment 643947 [details] [diff] [review]
Patch

If a script calls Math.pow a lot, and the second argument is either int32 or double, the JITs always pass it as double. This means Math.pow should also use powi if the second argument is an integer-valued double.

This may be a very small v8-raytrace/kraken-darkroom win, but I had to write the patch anyway to measure that so let's just fix it.
Comment 2 Ryan VanderMeulen [:RyanVM] 2012-07-20 21:06:25 PDT
https://hg.mozilla.org/mozilla-central/rev/b5c4c6e98b5c

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