Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(892)

Issue 3584015: Implement fast case for strtod. (Closed)

Created:
10 years, 2 months ago by Florian Loitsch
Modified:
9 years, 7 months ago
Reviewers:
William Hesse
CC:
v8-dev
Visibility:
Public.

Description

Implement fast case for strtod. If there are few non-zero digits and the 10^exponent fits into a double then we can compute the result using 1 (or 2) double operations. BUG= TEST= Committed: http://code.google.com/p/v8/source/detail?r=5603

Patch Set 1 #

Patch Set 2 : Renamed strtod to Strtod and added tests. #

Total comments: 2

Patch Set 3 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+257 lines, -4 lines) Patch
M src/conversions.cc View 2 2 chunks +2 lines, -2 lines 0 comments Download
M src/strtod.h View 2 1 chunk +1 line, -1 line 0 comments Download
M src/strtod.cc View 1 2 2 chunks +98 lines, -1 line 0 comments Download
M test/cctest/SConscript View 1 chunk +1 line, -0 lines 0 comments Download
A test/cctest/test-strtod.cc View 1 chunk +155 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Florian Loitsch
Dependent on Issue 3563009 (http://codereview.chromium.org/3563009/show).
10 years, 2 months ago (2010-10-06 20:28:30 UTC) #1
William Hesse
LGTM. This looks great! http://codereview.chromium.org/3584015/diff/2001/3001 File src/conversions.cc (right): http://codereview.chromium.org/3584015/diff/2001/3001#newcode357 src/conversions.cc:357: return sign ? -Strtod(buffer_vector, NULL) ...
10 years, 2 months ago (2010-10-07 11:49:37 UTC) #2
Florian Loitsch
10 years, 2 months ago (2010-10-07 12:00:43 UTC) #3
http://codereview.chromium.org/3584015/diff/2001/3001
File src/conversions.cc (right):

http://codereview.chromium.org/3584015/diff/2001/3001#newcode357
src/conversions.cc:357: return sign ? -Strtod(buffer_vector, NULL) :
Strtod(buffer_vector, NULL);
On 2010/10/07 11:49:37, William Hesse wrote:
> Isn't the exponent an integer argument?  Why use NULL instead of 0?

Thanks for spotting this. Done.

Powered by Google App Engine
This is Rietveld 408576698