WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
15761
Speed up JSImmediate::getTruncated* by using custom float -> int code
https://bugs.webkit.org/show_bug.cgi?id=15761
Summary
Speed up JSImmediate::getTruncated* by using custom float -> int code
Eric Seidel (no email)
Reported
2007-10-30 03:17:42 PDT
Speed up JSImmediate::getTruncated* by using custom float -> int code I've written some code for this (attached). It seems to break sun-spider, even though my printf-debugging seems to suggest my code is correct. Not sure yet what's wrong. Anyone should feel free to fix/land this as needed, I probably won't get to look at it for several days.
Attachments
broken fix
(3.00 KB, patch)
2007-10-30 03:19 PDT
,
Eric Seidel (no email)
no flags
Details
Formatted Diff
Diff
nearly correct functions (fail two tests) inside test harness
(6.36 KB, text/plain)
2007-10-30 19:22 PDT
,
Eric Seidel (no email)
no flags
Details
an actual patch for JSC (same code as in test above)
(2.80 KB, patch)
2007-10-30 20:18 PDT
,
Eric Seidel (no email)
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Eric Seidel (no email)
Comment 1
2007-10-30 03:19:00 PDT
Created
attachment 16944
[details]
broken fix
Eric Seidel (no email)
Comment 2
2007-10-30 19:22:06 PDT
Created
attachment 16956
[details]
nearly correct functions (fail two tests) inside test harness
Eric Seidel (no email)
Comment 3
2007-10-30 19:23:49 PDT
The test output: Running JSImmediate::getTruncated* tests, this will take a while. testing : -2147483648 : 1000 0000 0000 0000 0000 0000 0000 0000 getTruncatedUInt32 -0.000000 expected: 0 (1) got: 0 (0) testing : -822083584 : 1100 1111 0000 0000 0000 0000 0000 0000 getTruncatedInt32 -2147483648.000000 expected: -2147483648 (1) got: -2147483648 (0) The first failure is obvious. Not sure if we need to support it (depending on how 0 is stored in JSImmediate floats), probably though. The second failure seems to be related to exponent size.
Eric Seidel (no email)
Comment 4
2007-10-30 19:56:55 PDT
FYI, in addition to being slightly wrong... this code is also slightly (but only slightly!) slower than the current float -> int code. I'm confident that both correctness and speed can be fixed, but I'm a bit tired to do so myself. Perhaps someone will do so while I'm in Mexico.
Eric Seidel (no email)
Comment 5
2007-10-30 20:18:28 PDT
Created
attachment 16957
[details]
an actual patch for JSC (same code as in test above)
Darin Adler
Comment 6
2007-11-08 22:59:14 PST
Oliver got good results by switching our immediate optimization from floating point to int instead.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug