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

Issue 1611021: Reimplement InsertSort to use simple linear search. (Closed)

Created:
10 years, 8 months ago by antonm
Modified:
9 years, 4 months ago
Reviewers:
Lasse Reichstein
CC:
v8-dev
Visibility:
Public.

Description

Reimplement InsertSort to use simple linear search. And various minor cleanups. Committed: http://code.google.com/p/v8/source/detail?r=4392

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -44 lines) Patch
M src/array.js View 3 chunks +14 lines, -44 lines 2 comments Download

Messages

Total messages: 3 (0 generated)
antonm
Lasse, promised cleanup and simplification. May you have a look?
10 years, 8 months ago (2010-04-12 07:13:36 UTC) #1
Lasse Reichstein
LGTM http://codereview.chromium.org/1611021/diff/1/2 File src/array.js (right): http://codereview.chromium.org/1611021/diff/1/2#newcode715 src/array.js:715: var key = %_IsSmi(element) ? element : ToString(element); ...
10 years, 8 months ago (2010-04-12 07:35:42 UTC) #2
antonm
10 years, 8 months ago (2010-04-12 15:24:25 UTC) #3
Thanks a lot for review, Lasse.

http://codereview.chromium.org/1611021/diff/1/2
File src/array.js (right):

http://codereview.chromium.org/1611021/diff/1/2#newcode715
src/array.js:715: var key = %_IsSmi(element) ? element : ToString(element);
On 2010/04/12 07:35:42, Lasse Reichstein wrote:
> I'm very much attached to this line, but on the other hand, the most common
uses
> of sort-with-default-comparison is on numbers and strings, so it might just be
> overhead.
> 
> Keep it, but maybe try a test run later without this line and see if it makes
a
> difference in any direction.

Sure.  Sending to golem in no time.

Powered by Google App Engine
This is Rietveld 408576698