Bug 38294 - Add fast paths for Math.pow and Math.sqrt
Summary: Add fast paths for Math.pow and Math.sqrt
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 38308
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-28 17:09 PDT by Oliver Hunt
Modified: 2010-04-28 23:41 PDT (History)
4 users (show)

See Also:


Attachments
Patch (30.10 KB, patch)
2010-04-28 17:23 PDT, Oliver Hunt
barraclough: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Hunt 2010-04-28 17:09:48 PDT
Add fast paths for Math.pow and Math.sqrt
Comment 1 Oliver Hunt 2010-04-28 17:23:26 PDT
Created attachment 54640 [details]
Patch
Comment 2 WebKit Review Bot 2010-04-28 17:29:03 PDT
Attachment 54640 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1
JavaScriptCore/assembler/X86Assembler.h:1397:  movsd_mr is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
JavaScriptCore/assembler/X86Assembler.h:1465:  sqrtsd_rr is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
Total errors found: 2 in 17 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Gavin Barraclough 2010-04-28 20:52:20 PDT
Comment on attachment 54640 [details]
Patch

Have you tested USE(JSVALUE32)? – we shouldn't break this.

One thought that might help a little on x86-64, you could plant these values:...
> +static const double oneConstant = 1.0;
> +static const double negativeHalfConstant = -0.5;
...somewhere in the JIT code buffers, then these could be loaded with a PC-relative memory access.
Comment 4 Oliver Hunt 2010-04-28 20:57:47 PDT
Committed r58469
Comment 5 WebKit Review Bot 2010-04-28 21:24:05 PDT
http://trac.webkit.org/changeset/58469 might have broken Qt Linux Release
Comment 6 Adam Barth 2010-04-28 21:38:24 PDT
Fix landed in r58475.
Comment 7 Zoltan Herczeg 2010-04-28 23:41:27 PDT
https://bugs.webkit.org/show_bug.cgi?id=26987

Maybe we could revive this work as well. I have already tried to play around fast path for Math but they were rejected at that time.