Notes on my tiny external sort-showdown package Sandokan_r3_vs_Windows-sort_vs_TNSORT.zip:

Just run this line: GENERATE_Xmillion_Knight-Tours_and_SORT_them.bat KT3million.txt c: 11 100000 3000000

The above test sorts 3million (130bytes long lines) Knight-Tours, of course to make things funnier change 3000000 with 3000000000, yes 3million vs 3billion.
Sandokan r.4 is still not ready, so here comes r.3 vs Windows sort vs TNSORT.
I was surprised to see how definitely TNSORT outperformed RPSORT: 15s vs 20s, yet the first sorter is 32bit while the second 16bit.
Many thanks to THOMAS NIEMANN who kindly has shared his C implementation.

Kaze,
2012-Apr-16

Console log file under Windows XP 32bit, SSD Samsung 470, T7500 2200MHz 4GB DDR2:
[
E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort_vs_TNSORT>dir
 Volume in drive E is SSD_Sanmayce
 Volume Serial Number is 4C99-82D8

 Directory of E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort_vs_TNSORT

04/16/2012  04:40 AM    <DIR>          .
04/16/2012  04:40 AM    <DIR>          ..
04/16/2012  04:41 AM               947 GENERATE_Xmillion_Knight-Tours_and_SORT_them.bat
04/16/2012  04:41 AM             1,632 KAZE prompt.lnk
04/16/2012  04:41 AM            24,490 Knight-tour_r8dump.c
04/16/2012  04:41 AM            73,728 Knight-tour_r8dump_Microsoft_V16_32bit_Ox.exe
04/16/2012  04:41 AM            15,815 Niemann_replacement_selection+polyphase_merge_sort.c
04/16/2012  04:41 AM            61,952 Niemann_replacement_selection+polyphase_merge_sort.exe
04/16/2012  04:41 AM            12,040 README.TXT
04/16/2012  04:41 AM           301,406 Sandokan_Logo.pdf
04/16/2012  04:41 AM           170,085 Sandokan_QuickSortExternal_4+GB.c
04/16/2012  04:41 AM           114,688 Sandokan_QuickSortExternal_4+GB_32bit_Intel.exe
04/16/2012  04:41 AM            94,208 Sandokan_QuickSortExternal_4+GB_32bit_Microsoft.exe
04/16/2012  04:41 AM           122,368 Sandokan_QuickSortExternal_4+GB_64bit_Intel.exe
04/16/2012  04:41 AM           103,936 Sandokan_QuickSortExternal_4+GB_64bit_Microsoft.exe
04/16/2012  04:41 AM             9,458 sha1sum.c
04/16/2012  04:41 AM            49,152 sha1sum_Microsoft_V16_32bit_Ox.exe
04/16/2012  04:41 AM           313,477 Sort_related.zip
04/16/2012  04:41 AM             4,096 Timer.exe
              17 File(s)      1,473,478 bytes
               2 Dir(s)  54,430,289,920 bytes free

E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort_vs_TNSORT>GENERATE_Xmillion_Knight-Tours_and_SORT_them.bat KT3million.txt e: 11 100000 3000000

Microsoft Windows XP [Version 5.1.2600]
Sorting these 3000000 Knight-Tours ...

E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort_vs_TNSORT>Sandokan_QuickSortExternal_4+GB_32bit_Microsoft.exe KT3million.txt /slow /ascend 768
Sandokan_QuickSortExternal_4+GB r.3, written by Kaze, using Bill Durango's Quicksort source.
Size of input file: 390,000,000
Counting lines ...
Lines encountered: 3,000,000
Longest line (including CR if present): 129
Allocated memory for pointers-to-lines in MB: 22
Assigning pointers ...
SLOW! Get on with slow external accesses.
Sorting 3,000,000 Pointers ...
Quicksort (Insertionsort for small blocks) commenced ...
| RightEnd: 000,001,500,225; NumberOfSplittings: 0,000,335,016; Done: 100% ...
NumberOfComparisons: 71,052,662
The time to sort 3,000,000 items via Quicksort+Insertionsort was 353,219 clocks.
Dumping the sorted data ...
/ Done 100% ...
Dumped 3,000,000 lines.
OK! Incoming and resultant file's sizes match.
Dump time: 11,234 clocks.
Total time: 368,687 clocks.
Performance: 1,057 bytes/clock.
Done successfully.

E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort_vs_TNSORT>sha1sum_Microsoft_V16_32bit_Ox.exe "QuickSortExternal_4+GB.txt"
6c8afb5b545473324aec0237a6afd2d4a374f37e  QuickSortExternal_4+GB.txt

E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort_vs_TNSORT>timer Niemann_replacement_selection+polyphase_merge_sort.exe KT3million.txt KT3million.txt.Niemann 11 100000
Timer 9.01 : Igor Pavlov : Public domain : 2009-05-31
extSort: nFiles=11, nNodes=100000, lrecl=130

Kernel Time  =     2.375 =   15%
User Time    =    13.187 =   83%
Process Time =    15.562 =   98%
Global Time  =    15.790 =  100%

E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort_vs_TNSORT>sha1sum_Microsoft_V16_32bit_Ox.exe KT3million.txt.Niemann
6c8afb5b545473324aec0237a6afd2d4a374f37e  KT3million.txt.Niemann

E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort_vs_TNSORT>timer sort /M 1048576 /T e: KT3million.txt /O KT3million.txt.Windows
Timer 9.01 : Igor Pavlov : Public domain : 2009-05-31

Kernel Time  =     0.453 =    1%
User Time    =    36.796 =   95%
Process Time =    37.250 =   97%
Global Time  =    38.384 =  100%

E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort_vs_TNSORT>sha1sum_Microsoft_V16_32bit_Ox.exe KT3million.txt.Windows
6c8afb5b545473324aec0237a6afd2d4a374f37e  KT3million.txt.Windows

E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort_vs_TNSORT>

timer Niemann_replacement_selection+polyphase_merge_sort.exe KT3million.txt KT3million.txt.Niemann 300 1000000
Timer 9.01 : Igor Pavlov : Public domain : 2009-05-31
extSort: nFiles=300, nNodes=1000000, lrecl=130

Kernel Time  =     2.312 =    8%
User Time    =    19.078 =   68%
Process Time =    21.390 =   77%
Global Time  =    27.667 =  100%

timer Niemann_replacement_selection+polyphase_merge_sort.exe KT3million.txt KT3million.txt.Niemann 300 100000
Timer 9.01 : Igor Pavlov : Public domain : 2009-05-31
extSort: nFiles=300, nNodes=100000, lrecl=130

Kernel Time  =     2.359 =   11%
User Time    =    14.828 =   71%
Process Time =    17.187 =   83%
Global Time  =    20.650 =  100%

timer Niemann_replacement_selection+polyphase_merge_sort.exe KT3million.txt KT3million.txt.Niemann 300 10000
Timer 9.01 : Igor Pavlov : Public domain : 2009-05-31
extSort: nFiles=300, nNodes=10000, lrecl=130

Kernel Time  =     2.015 =    5%
User Time    =    25.562 =   66%
Process Time =    27.578 =   71%
Global Time  =    38.726 =  100%

timer Niemann_replacement_selection+polyphase_merge_sort.exe KT3million.txt KT3million.txt.Niemann 300 1000
Timer 9.01 : Igor Pavlov : Public domain : 2009-05-31
extSort: nFiles=300, nNodes=1000, lrecl=130

Kernel Time  =     2.531 =    2%
User Time    =    81.921 =   85%
Process Time =    84.453 =   88%
Global Time  =    95.575 =  100%

timer Niemann_replacement_selection+polyphase_merge_sort.exe KT3million.txt KT3million.txt.Niemann 30 1000000
Timer 9.01 : Igor Pavlov : Public domain : 2009-05-31
extSort: nFiles=30, nNodes=1000000, lrecl=130

Kernel Time  =     2.609 =    9%
User Time    =    18.015 =   66%
Process Time =    20.625 =   75%
Global Time  =    27.237 =  100%

timer Niemann_replacement_selection+polyphase_merge_sort.exe KT3million.txt KT3million.txt.Niemann 30 100000
Timer 9.01 : Igor Pavlov : Public domain : 2009-05-31
extSort: nFiles=30, nNodes=100000, lrecl=130

Kernel Time  =     1.859 =    9%
User Time    =    14.140 =   73%
Process Time =    16.000 =   83%
Global Time  =    19.232 =  100%

timer Niemann_replacement_selection+polyphase_merge_sort.exe KT3million.txt KT3million.txt.Niemann 30 10000
Timer 9.01 : Igor Pavlov : Public domain : 2009-05-31
extSort: nFiles=30, nNodes=10000, lrecl=130

Kernel Time  =     3.203 =    8%
User Time    =    17.375 =   45%
Process Time =    20.578 =   53%
Global Time  =    38.520 =  100%

timer Niemann_replacement_selection+polyphase_merge_sort.exe KT3million.txt KT3million.txt.Niemann 30 1000
Timer 9.01 : Igor Pavlov : Public domain : 2009-05-31
extSort: nFiles=30, nNodes=1000, lrecl=130

Kernel Time  =     4.015 =    9%
User Time    =    25.718 =   62%
Process Time =    29.734 =   72%
Global Time  =    40.832 =  100%

timer Niemann_replacement_selection+polyphase_merge_sort.exe KT3million.txt KT3million.txt.Niemann 3 1000000
Timer 9.01 : Igor Pavlov : Public domain : 2009-05-31
extSort: nFiles=3, nNodes=1000000, lrecl=130

Kernel Time  =     2.203 =   10%
User Time    =    17.218 =   84%
Process Time =    19.421 =   95%
Global Time  =    20.358 =  100%

timer Niemann_replacement_selection+polyphase_merge_sort.exe KT3million.txt KT3million.txt.Niemann 3 100000
Timer 9.01 : Igor Pavlov : Public domain : 2009-05-31
extSort: nFiles=3, nNodes=100000, lrecl=130

Kernel Time  =     4.765 =   19%
User Time    =    16.593 =   66%
Process Time =    21.359 =   85%
Global Time  =    25.043 =  100%

timer Niemann_replacement_selection+polyphase_merge_sort.exe KT3million.txt KT3million.txt.Niemann 3 10000
Timer 9.01 : Igor Pavlov : Public domain : 2009-05-31
extSort: nFiles=3, nNodes=10000, lrecl=130

Kernel Time  =     7.703 =   20%
User Time    =    19.484 =   52%
Process Time =    27.187 =   73%
Global Time  =    37.119 =  100%

timer Niemann_replacement_selection+polyphase_merge_sort.exe KT3million.txt KT3million.txt.Niemann 3 1000
Timer 9.01 : Igor Pavlov : Public domain : 2009-05-31
extSort: nFiles=3, nNodes=1000, lrecl=130

Kernel Time  =    14.000 =   21%
User Time    =    23.625 =   37%
Process Time =    37.625 =   58%
Global Time  =    63.828 =  100%

timer Niemann_replacement_selection+polyphase_merge_sort.exe KT3million.txt KT3million.txt.Niemann 6 100000
Timer 9.01 : Igor Pavlov : Public domain : 2009-05-31
extSort: nFiles=6, nNodes=100000, lrecl=130

Kernel Time  =     2.515 =   12%
User Time    =    13.734 =   70%
Process Time =    16.250 =   83%
Global Time  =    19.365 =  100%

timer Niemann_replacement_selection+polyphase_merge_sort.exe KT3million.txt KT3million.txt.Niemann 7 100000
Timer 9.01 : Igor Pavlov : Public domain : 2009-05-31
extSort: nFiles=7, nNodes=100000, lrecl=130

Kernel Time  =     2.359 =   14%
User Time    =    13.515 =   83%
Process Time =    15.875 =   97%
Global Time  =    16.271 =  100%

timer Niemann_replacement_selection+polyphase_merge_sort.exe KT3million.txt KT3million.txt.Niemann 8 100000
Timer 9.01 : Igor Pavlov : Public domain : 2009-05-31
extSort: nFiles=8, nNodes=100000, lrecl=130

Kernel Time  =     2.265 =   12%
User Time    =    13.218 =   71%
Process Time =    15.484 =   83%
Global Time  =    18.491 =  100%

timer Niemann_replacement_selection+polyphase_merge_sort.exe KT3million.txt KT3million.txt.Niemann 9 100000
Timer 9.01 : Igor Pavlov : Public domain : 2009-05-31
extSort: nFiles=9, nNodes=100000, lrecl=130

Kernel Time  =     2.468 =   10%
User Time    =    13.953 =   57%
Process Time =    16.421 =   68%
Global Time  =    24.127 =  100%

timer Niemann_replacement_selection+polyphase_merge_sort.exe KT3million.txt KT3million.txt.Niemann 10 100000
Timer 9.01 : Igor Pavlov : Public domain : 2009-05-31
extSort: nFiles=10, nNodes=100000, lrecl=130

Kernel Time  =     2.343 =   11%
User Time    =    13.515 =   65%
Process Time =    15.859 =   76%
Global Time  =    20.635 =  100%

timer Niemann_replacement_selection+polyphase_merge_sort.exe KT3million.txt KT3million.txt.Niemann 11 100000
Timer 9.01 : Igor Pavlov : Public domain : 2009-05-31
extSort: nFiles=11, nNodes=100000, lrecl=130

Kernel Time  =     1.984 =   12%
User Time    =    13.312 =   86%
Process Time =    15.296 =   98%
Global Time  =    15.476 =  100%

timer Niemann_replacement_selection+polyphase_merge_sort.exe KT3million.txt KT3million.txt.Niemann 12 100000
Timer 9.01 : Igor Pavlov : Public domain : 2009-05-31
extSort: nFiles=12, nNodes=100000, lrecl=130

Kernel Time  =     1.921 =    9%
User Time    =    14.031 =   71%
Process Time =    15.953 =   81%
Global Time  =    19.646 =  100%

timer Niemann_replacement_selection+polyphase_merge_sort.exe KT3million.txt KT3million.txt.Niemann 13 100000
Timer 9.01 : Igor Pavlov : Public domain : 2009-05-31
extSort: nFiles=13, nNodes=100000, lrecl=130

Kernel Time  =     2.093 =    9%
User Time    =    14.062 =   66%
Process Time =    16.156 =   76%
Global Time  =    21.254 =  100%
]