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

Issue 7261008: Improvement to SmiLexicalCompare (Closed)

Created:
9 years, 6 months ago by sra1
Modified:
9 years ago
CC:
v8-dev
Visibility:
Public.

Description

Improvement to SmiLexicalCompare If two positive Smis have the same number of decimal digits the lexical order is the same as the numeric order. Values with different numbers of decimal digits are compared by pre-scaling with some power of 10 to make the number of digits the same. This approach avoids the expensive digit generation loop of the previous approach. Strengthened testing and fixed bugs. There were several places where the code was incorrect 32-bit Smis when one of the values is MIN_INT.

Patch Set 1 #

Total comments: 5

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 1

Patch Set 6 : '' #

Patch Set 7 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+184 lines, -54 lines) Patch
A src/misc-intrinsics.h View 1 1 chunk +89 lines, -0 lines 0 comments Download
M src/runtime.h View 1 2 3 4 5 2 chunks +0 lines, -8 lines 0 comments Download
M src/runtime.cc View 1 2 3 4 5 2 chunks +49 lines, -29 lines 0 comments Download
M test/mjsunit/array-sort.js View 1 2 3 4 5 2 chunks +46 lines, -17 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
sra1
The benchmark below goes from ~10000 us to ~6000 us. There does not appear to ...
9 years, 6 months ago (2011-06-25 00:23:03 UTC) #1
Erik Corry
Do we have adequate test coverage? Cases that should be covered include: One value is ...
9 years, 6 months ago (2011-06-25 11:12:03 UTC) #2
sra1
There are good tests in array-sort, but I think they miss some cases (max-smi, min-smi). ...
9 years, 6 months ago (2011-06-25 19:31:33 UTC) #3
sra1
PTAL
9 years, 6 months ago (2011-06-25 22:04:10 UTC) #4
Erik Corry
LGTM
9 years, 6 months ago (2011-06-27 07:27:30 UTC) #5
Lasse Reichstein
9 years, 6 months ago (2011-06-27 08:41:47 UTC) #6
drive-by comment.

http://codereview.chromium.org/7261008/diff/3004/test/mjsunit/array-sort.js
File test/mjsunit/array-sort.js (right):

http://codereview.chromium.org/7261008/diff/3004/test/mjsunit/array-sort.js#n...
test/mjsunit/array-sort.js:80: assertEquals(false, %_IsSmi(2147483648), 'Update
test for >32 bit Smi');
Use assertFalse instead of assertEquals(false,

Powered by Google App Engine
This is Rietveld 408576698