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

Issue 5962003: Change quicksort pivot from random to median-of-three. (Closed)

Created:
10 years ago by Lasse Reichstein
Modified:
9 years, 6 months ago
Reviewers:
Karl Klose
CC:
v8-dev
Visibility:
Public.

Description

Change quicksort pivot from random to median-of-three. Tweak quicksort bailout parameter to minimize time.

Patch Set 1 #

Total comments: 4

Patch Set 2 : Addressed review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -11 lines) Patch
M src/array.js View 1 2 chunks +43 lines, -11 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Lasse Reichstein
10 years ago (2010-12-17 09:42:00 UTC) #1
Karl Klose
LGTM http://codereview.chromium.org/5962003/diff/1/src/array.js File src/array.js (right): http://codereview.chromium.org/5962003/diff/1/src/array.js#newcode657 src/array.js:657: } Consider putting InsertionSort back into ArraySort, so ...
10 years ago (2010-12-17 09:55:37 UTC) #2
Lasse Reichstein
10 years ago (2010-12-17 10:04:22 UTC) #3
http://codereview.chromium.org/5962003/diff/1/src/array.js
File src/array.js (right):

http://codereview.chromium.org/5962003/diff/1/src/array.js#newcode657
src/array.js:657: }
Done.
It was an attempt at a micro-optimization, but its impact, if there is one, is
below the level of measurability.

http://codereview.chromium.org/5962003/diff/1/src/array.js#newcode746
src/array.js:746: // of a prototype property.
Done.

Powered by Google App Engine
This is Rietveld 408576698