This makes the sort_skqsort_ bench ~7% faster in the rand case and ~12% faster in ...
11 years, 9 months ago
(2013-02-04 17:17:44 UTC)
#1
This makes the sort_skqsort_ bench ~7% faster in the rand case and ~12% faster
in the rand10 case. Note that this almost exclusively comes from increasing the
insertion sort threshold from 8 to 32. At these sizes insertion sort takes about
the same time as the pivot, but leaves a sorted sub-list. Doing the same
(increasing the insertion sort threshold) with the existing (previous) code
makes it run with this same improved time. However, the code in this CL is
smaller and easier to reason about.
The main simplification is that we're already using heap sort as a depth cutoff,
so we no longer need to recurse on the smaller side to avoid O(n) stack usage.
Also, recursing on the left side improves cache locality (as we will tend to
move from left to right through the list).
Issue 7273048: Simplify and speed up SkIntroSort.
(Closed)
Created 11 years, 9 months ago by bungeman
Modified 11 years, 9 months ago
Reviewers: reed1
Base URL: http://skia.googlecode.com/svn/trunk/
Comments: 2