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

Issue 4065: Using quick sort for arrays.... (Closed)

Created:
12 years, 3 months ago by olehougaard
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Using quick sort for arrays. Using quick sort in ArraySort instead of heap sort for better performance. Committed: http://code.google.com/p/v8/source/detail?r=374

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -50 lines) Patch
M src/array.js View 1 chunk +21 lines, -50 lines 4 comments Download

Messages

Total messages: 3 (0 generated)
olehougaard
12 years, 3 months ago (2008-09-24 12:23:21 UTC) #1
Mads Ager (chromium)
LGTM, except for the following comments. http://codereview.chromium.org/4065/diff/1/2 File src/array.js (left): http://codereview.chromium.org/4065/diff/1/2#oldcode724 Line 724: if (IS_ARRAY(this)) ...
12 years, 3 months ago (2008-09-24 12:34:43 UTC) #2
mdakin
12 years, 3 months ago (2008-09-25 14:25:28 UTC) #3
http://codereview.chromium.org/4065/diff/1/2
File src/array.js (right):

http://codereview.chromium.org/4065/diff/1/2#newcode651
Line 651: // Standard in-place HeapSort algorithm.
I think it is Quicksort now.

http://codereview.chromium.org/4065/diff/1/2#newcode697
Line 697: var length = ToUint32(this.length);
Maybe using insertion sort for small arrays (<10 elements ) would be good. It is
faster than Quicksort for small arrays.

Powered by Google App Engine
This is Rietveld 408576698