Closed Bug 775680 Opened 10 years ago Closed 10 years ago

Math.pow should use powi if the second argument is an integer-valued double

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: jandem, Assigned: jandem)

References

Details

(Whiteboard: [js:t])

Attachments

(1 file)

Attached patch PatchSplinter Review
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.
Attachment #643947 - Flags: review?(dvander)
Attachment #643947 - Flags: review?(dvander) → review+
Whiteboard: [js:t]
https://hg.mozilla.org/mozilla-central/rev/b5c4c6e98b5c
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.