The default bug view has changed. See this FAQ.

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

RESOLVED FIXED in mozilla17

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jandem, Assigned: jandem)

Tracking

unspecified
mozilla17
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [js:t])

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
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.
Attachment #643947 - Flags: review?(dvander)
Attachment #643947 - Flags: review?(dvander) → review+
(Assignee)

Comment 1

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/b5c4c6e98b5c
Target Milestone: --- → mozilla17
Whiteboard: [js:t]
https://hg.mozilla.org/mozilla-central/rev/b5c4c6e98b5c
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.