Closed Bug 876916 Opened 11 years ago Closed 11 years ago

optimize sqrt on asm.js

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: sunfish, Unassigned)

Details

Attachments

(1 file)

Math.sqrt under asm.js is currently lowered to a library call. IonMonkey already has an optimized implementation of Math.sqrt which is capable of emitting a single instruction on platforms which support it, so asm.js just needs to use it.
Attached patch a proposed fixSplinter Review
Attachment #755047 - Flags: review?(luke)
Attachment #755047 - Flags: review?(luke) → review+
Thanks!
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/17143afc4fab

Do we have tests for this? If not, should we?
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
There are existing tests that Math.sqrt returns the right answer for a variety of interesting inputs and existing tests that call Math.sqrt from asm.js. Unfortunately however, there's no framework for testing that the JIT performed a particular optimization or emitted a particular code sequence.
Correctness is my concern, so it sounds like we're good. Thanks.
Flags: in-testsuite? → in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: