Closed
Bug 571723
Opened 14 years ago
Closed 14 years ago
TM: add grisu3 double to string conversion algorithm implementation
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 558799
People
(Reporter: gal, Assigned: gal)
Details
Attachments
(1 file)
176.26 KB,
patch
|
Details | Diff | Splinter Review |
V8 was so kind to implement this. See also Loitsch et al., "Printing Floating-Point Numbers Quickly and Accurately with Integers", PLDI'10.
Assignee | ||
Comment 1•14 years ago
|
||
This patch adds the grisu3 implementation from V8. Its not wired up yet, but it compiles.
Assignee: general → gal
Comment 2•14 years ago
|
||
Cool -- does this free us of the *dtoa.c code whose old ugly '80s C style makes angels cry tears of blood? /be
Assignee | ||
Comment 3•14 years ago
|
||
No. grisu3 prints the correct number in 99.8% of cases, and refuses to print in the others, in which case we have to fall back on dtoa. grisu is a 4x speedup, so its very likely worth it.
Comment 4•14 years ago
|
||
99.8% fewer tears of blood -- Ok. Maybe some day the 0.2% will be gone. /be
Assignee | ||
Comment 5•14 years ago
|
||
Sunspider dtoa statistics: 2 4.096774 2 9.645161 2 9.661290 2 9.903226 2 9.919355 60 0.070000 920 0.800000 4088 dtoa calls in total.
Assignee | ||
Comment 6•14 years ago
|
||
v8-splay: 294405 dtoa calls Utterly f* ridiculous. No dtoa conversion in the rest of the v8 suite.
Comment 7•14 years ago
|
||
This would be totally helpful for things that do left/top CSS style animations too.
Comment 8•14 years ago
|
||
(In reply to comment #6) > v8-splay: > > 294405 dtoa calls > > Utterly f* ridiculous. And just think, bug 562553 removed 97% of them. Hence http://code.google.com/p/v8/issues/detail?id=690, which looks like it's being worked on. Also note http://code.google.com/p/v8/issues/detail?id=690#c2 which explains that the Setup and Teardown functions aren't measured in the official V8 suite, but that Sunspider does measure them(!)
Updated•14 years ago
|
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•