summaryrefslogtreecommitdiffstats
path: root/Objects/listsort.txt
Commit message (Collapse)AuthorAgeFilesLines
* Fixed new typos, added a little info about ~sort versus "hint"s.Tim Peters2002-08-101-4/+10
|
* 1. Combined the base and length arrays into a single array of structs.Tim Peters2002-08-101-23/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is friendlier for caches. 2. Cut MIN_GALLOP to 7, but added a per-sort min_gallop vrbl that adapts the "get into galloping mode" threshold higher when galloping isn't paying, and lower when it is. There's no known case where this hurts. It's (of course) neutral for /sort, \sort and =sort. It also happens to be neutral for !sort. It cuts a tiny # of compares in 3sort and +sort. For *sort, it reduces the # of compares to better than what this used to do when MIN_GALLOP was hardcoded to 10 (it did about 0.1% more *sort compares before, but given how close we are to the limit, this is "a lot"!). %sort used to do about 1.5% more compares, and ~sort about 3.6% more. Here are exact counts: i *sort 3sort +sort %sort ~sort !sort 15 449235 33019 33016 51328 188720 65534 before 448885 33016 33007 50426 182083 65534 after 0.08% 0.01% 0.03% 1.79% 3.65% 0.00% %ch from after 16 963714 65824 65809 103409 377634 131070 962991 65821 65808 101667 364341 131070 0.08% 0.00% 0.00% 1.71% 3.65% 0.00% 17 2059092 131413 131362 209130 755476 262142 2057533 131410 131361 206193 728871 262142 0.08% 0.00% 0.00% 1.42% 3.65% 0.00% 18 4380687 262440 262460 421998 1511174 524286 4377402 262437 262459 416347 1457945 524286 0.08% 0.00% 0.00% 1.36% 3.65% 0.00% 19 9285709 524581 524634 848590 3022584 1048574 9278734 524580 524633 837947 2916107 1048574 0.08% 0.00% 0.00% 1.27% 3.65% 0.00% 20 19621118 1048960 1048942 1715806 6045418 2097150 19606028 1048958 1048941 1694896 5832445 2097150 0.08% 0.00% 0.00% 1.23% 3.65% 0.00% 3. Added some key asserts I overlooked before. 4. Updated the doc file.
* The samplesort-vs-mergesort #-of-comparisons comparisons were capturedTim Peters2002-08-101-24/+24
| | | | | | | | before %sort was introduced. Redid them (the numbers change, but the conclusions don't). Also did the samplesort counts with the released 2.2.1, as they're slightly different under the last CVS 2.3 samplesort (some higher, some lower -- CVS had been changed to stop doing the special-case business on recursive samplesort calls).
* Repaired a braino in the description of bad minrun values.Tim Peters2002-08-091-3/+3
|
* Added info about highwater heap-memory use for the sortperf.py tests; + aTim Peters2002-08-081-3/+31
| | | | couple of minor edits elsewhere.
* Checking in the doc file for "timsort". There's way too much here toTim Peters2002-08-011-0/+618
stuff into code comments, and lots of it is going to be useful again (but hard to predict exactly which parts of it ...).