Notes on my latest sort-showdown test package Sandokan_r3_vs_Windows-sort.zip 2.29 MB (2,409,553 bytes): Sandokan revision 3 still uses only pure Quicksort technique, naturally the huge amount of drive-seeks hurts the performance in a uglifying manner. Note 1: The package can be downloaded freely at: www.sanmayce.com/Downloads/Sandokan_r3_vs_Windows-sort.zip Note 2: You may use/start the shortcut 'KAZE prompt.lnk' - it offers easy-to-the-eyes prompt i.e. font/color/size. Note 3: Sources of all (except Windows' one) participants are given. Note 4: Sandokan executables 32bit/64bit are included, Intel 12.1 and Microsoft VS2010 compilers were used, yes 4 EXEs in total. Note 5: An interesting flip (again) was spotted for Sandokan_QuickSortExternal_4+GB_32bit_Microsoft.exe namely being the fastest of all 4/2 variants: 27s/39s/35s/34s/29s for Sandokan_32bit_Microsoft/Sandokan_64bit_Microsoft/Sandokan_32bit_Intel/Sandokan_64bit_Intel/Windows on Windows 7 64bit; and 29s/37s/37s for Sandokan_32bit_Microsoft/Sandokan_32bit_Intel/Windows on Windows XP 32bit. Note 6: Sandokan r.3 is five+ times slower than Windows 7 64bit sort, fourth mode (QM: Quicksorting chunks and Merging them) is to enter in next revisions. Just run a batch file: GENERATE_3million_Knight-Tours_and_SORT_them.bat GENERATE_40million_Knight-Tours_and_SORT_them.bat First batch sorts 390,000,000 bytes long file while the second sorts 5,200,000,000 bytes long file. New fancy SSD drives boast 50++KIOPS (aligned as if we have only such geometry), well here comes Sandokan to reveal the back-side of these advertisements being (still) bad. If you want to torture your "fast" SSD drive seeing how badly it behaves under massive load of (129bytes long) random accesses try instead of 40million_Knight-Tours to sort 400million_Knight-Tours: just change the number 40000000 with, say, 400000000 then you sort 52,000,000,000 bytes long file, which requires 128GB drive. Sandokan_QuickSortExternal_4+GB_64bit_Microsoft.exe results: To sort (on my laptop T7500 2200MHz 4MB L2 4GB DDR2, Windows 7 64bit) first 3 million (129 bytes long strings) Knight-Tours took 39s/29s respectively for Sandokan/Windows-sort. To sort (on my laptop T7500 2200MHz 4MB L2 4GB DDR2, Windows 7 64bit) first 40 million (129 bytes long strings) Knight-Tours took 2624s/503s respectively for Sandokan/Windows-sort. The logs obtained on Windows 7 64bit and Windows XP 32bit for GENERATE_3million_Knight-Tours_and_SORT_them.bat are given further below. Enjoy! Kaze, 2012-Apr-13 Resultant log on my laptop T7500 2200MHz 4MB L2 4GB DDR2, Windows 7 64bit: [ E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort>dir Volume in drive E is SSD_Sanmayce Volume Serial Number is 4C99-82D8 Directory of E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort 04/14/2012 01:32 AM . 04/14/2012 01:32 AM .. 04/14/2012 01:33 AM 187 Compile_Sandokan_Intel_32.bat 04/14/2012 01:33 AM 187 Compile_Sandokan_Intel_64.bat 04/14/2012 01:33 AM 194 Compile_Sandokan_Microsoft_32.bat 04/14/2012 01:33 AM 194 Compile_Sandokan_Microsoft_64.bat 04/14/2012 01:33 AM 989 GENERATE_3million_Knight-Tours_and_SORT_them.bat 04/14/2012 01:33 AM 1,169 GENERATE_40million_Knight-Tours_and_SORT_them.bat 04/14/2012 01:33 AM 1,632 KAZE prompt.lnk 04/14/2012 01:33 AM 24,490 Knight-tour_r8dump.c 04/14/2012 01:33 AM 73,728 Knight-tour_r8dump_Microsoft_V16_32bit_Ox.exe 04/14/2012 01:33 AM 552,448 Sandokan_Logo.doc 04/14/2012 01:33 AM 301,406 Sandokan_Logo.pdf 04/14/2012 01:33 AM 1,314,534 Sandokan_Logo.png 04/14/2012 01:33 AM 170,085 Sandokan_QuickSortExternal_4+GB.c 04/14/2012 01:33 AM 114,688 Sandokan_QuickSortExternal_4+GB_32bit_Intel.exe 04/14/2012 01:33 AM 94,208 Sandokan_QuickSortExternal_4+GB_32bit_Microsoft.exe 04/14/2012 01:33 AM 122,368 Sandokan_QuickSortExternal_4+GB_64bit_Intel.exe 04/14/2012 01:33 AM 103,936 Sandokan_QuickSortExternal_4+GB_64bit_Microsoft.exe 04/14/2012 01:33 AM 9,458 sha1sum.c 04/14/2012 01:33 AM 49,152 sha1sum_Microsoft_V16_32bit_Ox.exe 04/14/2012 01:33 AM 4,096 Timer.exe 20 File(s) 2,939,149 bytes 2 Dir(s) 22,999,609,344 bytes free E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort>GENERATE_3million_Knight-Tours_and_SORT_them.bat Microsoft Windows [Version 6.1.7601] Generating 3,000,000 Knight-Tours and dumping them into file 390,000,000 bytes ... E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort>Knight-tour_r8dump_Microsoft_V16_32bit_Ox.exe a8 3000000 1>KT3million.txt Sorting these 3,000,000 Knight-Tours ... E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort>"Sandokan_QuickSortExternal_4+GB_32bit_Microsoft.exe" KT3million.txt /fast /descend 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 ... sizeof(int), sizeof(void*): 4, 4 Trying to allocate memory for the file itself in MB: 371 ... OK! Get on with fast internal accesses. Uploading ... 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 21,029 clocks. Dumping the sorted data ... - Done 100% ... Dumped 3,000,000 lines. OK! Incoming and resultant file's sizes match. Dump time: 1,560 clocks. Total time: 27,144 clocks. Performance: 14,366 bytes/clock. Done successfully. E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort>sha1sum_Microsoft_V16_32bit_Ox.exe "QuickSortExternal_4+GB.txt" a053faa74ffb6cad41e61e273a1a0e0049cb25e7 QuickSortExternal_4+GB.txt E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort>"Sandokan_QuickSortExternal_4+GB_64bit_Microsoft.exe" KT3million.txt /fast /descend 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 ... sizeof(int), sizeof(void*): 4, 8 Trying to allocate memory for the file itself in MB: 371 ... OK! Get on with fast internal accesses. Uploading ... 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 34,850 clocks. Dumping the sorted data ... - Done 100% ... Dumped 3,000,000 lines. OK! Incoming and resultant file's sizes match. Dump time: 1,388 clocks. Total time: 39,982 clocks. Performance: 9,753 bytes/clock. Done successfully. E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort>sha1sum_Microsoft_V16_32bit_Ox.exe "QuickSortExternal_4+GB.txt" a053faa74ffb6cad41e61e273a1a0e0049cb25e7 QuickSortExternal_4+GB.txt E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort>"Sandokan_QuickSortExternal_4+GB_32bit_Intel.exe" KT3million.txt /fast /descend 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 ... sizeof(int), sizeof(void*): 4, 4 Trying to allocate memory for the file itself in MB: 371 ... OK! Get on with fast internal accesses. Uploading ... 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 30,092 clocks. Dumping the sorted data ... - Done 100% ... Dumped 3,000,000 lines. OK! Incoming and resultant file's sizes match. Dump time: 1,653 clocks. Total time: 35,568 clocks. Performance: 10,964 bytes/clock. Done successfully. E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort>sha1sum_Microsoft_V16_32bit_Ox.exe "QuickSortExternal_4+GB.txt" a053faa74ffb6cad41e61e273a1a0e0049cb25e7 QuickSortExternal_4+GB.txt E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort>"Sandokan_QuickSortExternal_4+GB_64bit_Intel.exe" KT3million.txt /fast /descend 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 ... sizeof(int), sizeof(void*): 4, 8 Trying to allocate memory for the file itself in MB: 371 ... OK! Get on with fast internal accesses. Uploading ... 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 29,765 clocks. Dumping the sorted data ... - Done 100% ... Dumped 3,000,000 lines. OK! Incoming and resultant file's sizes match. Dump time: 1,201 clocks. Total time: 34,226 clocks. Performance: 11,394 bytes/clock. Done successfully. E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort>sha1sum_Microsoft_V16_32bit_Ox.exe "QuickSortExternal_4+GB.txt" a053faa74ffb6cad41e61e273a1a0e0049cb25e7 QuickSortExternal_4+GB.txt E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort>timer sort /M 1048576 /R /T e: KT3million.txt /O KT3million.txt.Windows Timer 9.01 : Igor Pavlov : Public domain : 2009-05-31 Kernel Time = 0.530 = 1% User Time = 28.610 = 96% Process Time = 29.140 = 97% Global Time = 29.801 = 100% E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort>sha1sum_Microsoft_V16_32bit_Ox.exe KT3million.txt.Windows a053faa74ffb6cad41e61e273a1a0e0049cb25e7 KT3million.txt.Windows Volume in drive E is SSD_Sanmayce Volume Serial Number is 4C99-82D8 Directory of E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort 04/14/2012 01:40 AM . 04/14/2012 01:40 AM .. 04/14/2012 01:33 AM 187 Compile_Sandokan_Intel_32.bat 04/14/2012 01:33 AM 187 Compile_Sandokan_Intel_64.bat 04/14/2012 01:33 AM 194 Compile_Sandokan_Microsoft_32.bat 04/14/2012 01:33 AM 194 Compile_Sandokan_Microsoft_64.bat 04/14/2012 01:33 AM 989 GENERATE_3million_Knight-Tours_and_SORT_them.bat 04/14/2012 01:33 AM 1,169 GENERATE_40million_Knight-Tours_and_SORT_them.bat 04/14/2012 01:33 AM 1,632 KAZE prompt.lnk 04/14/2012 01:33 AM 24,490 Knight-tour_r8dump.c 04/14/2012 01:33 AM 73,728 Knight-tour_r8dump_Microsoft_V16_32bit_Ox.exe 04/14/2012 01:37 AM 390,000,000 KT3million.txt 04/14/2012 01:40 AM 390,000,000 KT3million.txt.Windows 04/14/2012 01:39 AM 390,000,000 QuickSortExternal_4+GB.txt 04/14/2012 01:33 AM 552,448 Sandokan_Logo.doc 04/14/2012 01:33 AM 301,406 Sandokan_Logo.pdf 04/14/2012 01:33 AM 1,314,534 Sandokan_Logo.png 04/14/2012 01:33 AM 170,085 Sandokan_QuickSortExternal_4+GB.c 04/14/2012 01:33 AM 114,688 Sandokan_QuickSortExternal_4+GB_32bit_Intel.exe 04/14/2012 01:33 AM 94,208 Sandokan_QuickSortExternal_4+GB_32bit_Microsoft.exe 04/14/2012 01:33 AM 122,368 Sandokan_QuickSortExternal_4+GB_64bit_Intel.exe 04/14/2012 01:33 AM 103,936 Sandokan_QuickSortExternal_4+GB_64bit_Microsoft.exe 04/14/2012 01:33 AM 9,458 sha1sum.c 04/14/2012 01:33 AM 49,152 sha1sum_Microsoft_V16_32bit_Ox.exe 04/14/2012 01:33 AM 4,096 Timer.exe 23 File(s) 1,172,939,149 bytes 2 Dir(s) 21,829,607,424 bytes free E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort>"Sandokan_QuickSortExternal_4+GB_32bit_Microsoft.exe" Sandokan_QuickSortExternal_4+GB r.3, written by Kaze, using Bill Durango's Quicksort source. Usage: Sandokan_QuickSortExternal_4+GB wordlistfile {/fast|/slow} {/ascend|/descend} PhysicalBlockInMB Purpose: Sandokan sorts all [CR]LF ending lines in a given file, lines can be 4++ billion i.e. more than 1<<32. Note1: Sandokan is [still] in look-around stage, for superfast sorter look for FFT, or Internal-Quicksort applied on biggest physical RAM block followed by chunks merging (all-sequential reads/writes). Note2: Currently (r.3-++) the idea is to see how Quicksort behaves on all-physical, physical-external and all-external RAM. Note3: The lines in wordlistfile must be up to 2048 chars/bytes and end with CRLF or LF i.e. maximum 2050bytes long. Note4: The goal is to sort a file unfittable in physical memory, and with 32bit code. Note5: When /fast is specified wordlistfile is uploaded into internal memory if it is possible. Note6: When /fast is specified and attempt to upload the entire file is failed then new attempt is made to use PhysicalBlockInMB for dynamic chunks uploading to the physical RAM block used for internal Quicksort, thus /fast is either all-internal or internal-external, PhysicalBlockInMB affects only this internal-external mode. Note7: When /slow is specified wordlistfile is NOT uploaded into internal memory even if it is possible, thus /slow is all-external. Note8: Not buffered I/O is just awful, like 1byte Reads/Writes: fread(&FourGram[i], 1, 1, fp_in); fwrite(&FourGram[i], 1, 1, fp_outRG);. Note9: The most cute thing about pure (r.3-++) Quicksort approach is the I/O Read-Only mode through all the sorting, of course if all the pointers are in physical (not a part in virtual) RAM (another ugly facet: 8bytes-per-line requirement), the ugly thing is the huge number of random accesses i.e. seeks, to bridge this gap in next revision a new (fourth) mode will be available: Quicksorting all chunks (fittable in a given physical block) and then simply merging them - an all-sequential approach except the few seeks needed for reaching the chunk offsets. NoteA: I cannot avoid asking myself: how come that sorting names of all people walked/walking on Earth (some 20 billion maybe) appeared such a difficult task, if Sandokan (r.3-++) is to sort (in external-internal regime) he (not it) would need 151GB (20,000,000,000x8+~1GB) physical (preferably) RAM as a minimum. An assumption: if names are 50bytes long in average then for all-internal mode the needed memory jumps to 150GB+932GB, ouch. NoteB: Any improvements are welcomed, my email: sanmayce@sanmayce.com, the idea is a free open-source sorter to become available. E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort>sort/? SORT [/R] [/+n] [/M kilobytes] [/L locale] [/REC recordbytes] [[drive1:][path1]filename1] [/T [drive2:][path2]] [/O [drive3:][path3]filename3] /+n Specifies the character number, n, to begin each comparison. /+3 indicates that each comparison should begin at the 3rd character in each line. Lines with fewer than n characters collate before other lines. By default comparisons start at the first character in each line. /L[OCALE] locale Overrides the system default locale with the specified one. The ""C"" locale yields the fastest collating sequence and is currently the only alternative. The sort is always case insensitive. /M[EMORY] kilobytes Specifies amount of main memory to use for the sort, in kilobytes. The memory size is always constrained to be a minimum of 160 kilobytes. If the memory size is specified the exact amount will be used for the sort, regardless of how much main memory is available. The best performance is usually achieved by not specifying a memory size. By default the sort will be done with one pass (no temporary file) if it fits in the default maximum memory size, otherwise the sort will be done in two passes (with the partially sorted data being stored in a temporary file) such that the amounts of memory used for both the sort and merge passes are equal. The default maximum memory size is 90% of available main memory if both the input and output are files, and 45% of main memory otherwise. /REC[ORD_MAXIMUM] characters Specifies the maximum number of characters in a record (default 4096, maximum 65535). /R[EVERSE] Reverses the sort order; that is, sorts Z to A, then 9 to 0. [drive1:][path1]filename1 Specifies the file to be sorted. If not specified, the standard input is sorted. Specifying the input file is faster than redirecting the same file as standard input. /T[EMPORARY] [drive2:][path2] Specifies the path of the directory to hold the sort's working storage, in case the data does not fit in main memory. The default is to use the system temporary directory. /O[UTPUT] [drive3:][path3]filename3 Specifies the file where the sorted input is to be stored. If not specified, the data is written to the standard output. Specifying the output file is faster than redirecting standard output to the same file. E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort> ] Resultant log on my laptop T7500 2200MHz 4MB L2 4GB DDR2, Windows XP 32bit: [ E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort>dir Volume in drive E is SSD_Sanmayce Volume Serial Number is 4C99-82D8 Directory of E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort 04/14/2012 12:43 AM . 04/14/2012 12:43 AM .. 04/14/2012 12:33 AM 187 Compile_Sandokan_Intel_32.bat 04/14/2012 12:33 AM 187 Compile_Sandokan_Intel_64.bat 04/14/2012 12:33 AM 194 Compile_Sandokan_Microsoft_32.bat 04/14/2012 12:33 AM 194 Compile_Sandokan_Microsoft_64.bat 04/14/2012 12:33 AM 989 GENERATE_3million_Knight-Tours_and_SORT_them.bat 04/14/2012 12:33 AM 1,169 GENERATE_40million_Knight-Tours_and_SORT_them.bat 04/14/2012 12:33 AM 1,632 KAZE prompt.lnk 04/14/2012 12:33 AM 24,490 Knight-tour_r8dump.c 04/14/2012 12:33 AM 73,728 Knight-tour_r8dump_Microsoft_V16_32bit_Ox.exe 04/14/2012 12:33 AM 552,448 Sandokan_Logo.doc 04/14/2012 12:33 AM 301,406 Sandokan_Logo.pdf 04/14/2012 12:33 AM 1,314,534 Sandokan_Logo.png 04/14/2012 12:33 AM 170,085 Sandokan_QuickSortExternal_4+GB.c 04/14/2012 12:33 AM 114,688 Sandokan_QuickSortExternal_4+GB_32bit_Intel.exe 04/14/2012 12:33 AM 94,208 Sandokan_QuickSortExternal_4+GB_32bit_Microsoft.exe 04/14/2012 12:33 AM 122,368 Sandokan_QuickSortExternal_4+GB_64bit_Intel.exe 04/14/2012 12:33 AM 103,936 Sandokan_QuickSortExternal_4+GB_64bit_Microsoft.exe 04/14/2012 12:33 AM 9,458 sha1sum.c 04/14/2012 12:33 AM 49,152 sha1sum_Microsoft_V16_32bit_Ox.exe 04/14/2012 12:33 AM 4,096 Timer.exe 20 File(s) 2,939,149 bytes 2 Dir(s) 23,001,370,624 bytes free E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort>GENERATE_3million_Knight-Tours_and_SORT_them.bat Microsoft Windows XP [Version 5.1.2600] Generating 3,000,000 Knight-Tours and dumping them into file 390,000,000 bytes ... E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort>Knight-tour_r8dump_Microsoft_V16_32bit_Ox.exe a8 3000000 1>KT3million.txt Sorting these 3,000,000 Knight-Tours ... E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort>"Sandokan_QuickSortExternal_4+GB_32bit_Microsoft.exe" KT3million.txt /fast /descend 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 ... sizeof(int), sizeof(void*): 4, 4 Trying to allocate memory for the file itself in MB: 371 ... OK! Get on with fast internal accesses. Uploading ... 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 20,984 clocks. Dumping the sorted data ... - Done 100% ... Dumped 3,000,000 lines. OK! Incoming and resultant file's sizes match. Dump time: 3,750 clocks. Total time: 29,437 clocks. Performance: 13,247 bytes/clock. Done successfully. E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort>sha1sum_Microsoft_V16_32bit_Ox.exe "QuickSortExternal_4+GB.txt" a053faa74ffb6cad41e61e273a1a0e0049cb25e7 QuickSortExternal_4+GB.txt E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort>"Sandokan_QuickSortExternal_4+GB_64bit_Microsoft.exe" KT3million.txt /fast /descend 768 Access is denied. E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort>sha1sum_Microsoft_V16_32bit_Ox.exe "QuickSortExternal_4+GB.txt" a053faa74ffb6cad41e61e273a1a0e0049cb25e7 QuickSortExternal_4+GB.txt E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort>"Sandokan_QuickSortExternal_4+GB_32bit_Intel.exe" KT3million.txt /fast /descend 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 ... sizeof(int), sizeof(void*): 4, 4 Trying to allocate memory for the file itself in MB: 371 ... OK! Get on with fast internal accesses. Uploading ... 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 30,047 clocks. Dumping the sorted data ... - Done 100% ... Dumped 3,000,000 lines. OK! Incoming and resultant file's sizes match. Dump time: 3,890 clocks. Total time: 37,765 clocks. Performance: 10,326 bytes/clock. Done successfully. E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort>sha1sum_Microsoft_V16_32bit_Ox.exe "QuickSortExternal_4+GB.txt" a053faa74ffb6cad41e61e273a1a0e0049cb25e7 QuickSortExternal_4+GB.txt E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort>"Sandokan_QuickSortExternal_4+GB_64bit_Intel.exe" KT3million.txt /fast /descend 768 Access is denied. E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort>sha1sum_Microsoft_V16_32bit_Ox.exe "QuickSortExternal_4+GB.txt" a053faa74ffb6cad41e61e273a1a0e0049cb25e7 QuickSortExternal_4+GB.txt E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort>timer sort /M 1048576 /R /T e: KT3million.txt /O KT3million.txt.Windows Timer 9.01 : Igor Pavlov : Public domain : 2009-05-31 Kernel Time = 0.656 = 1% User Time = 36.281 = 95% Process Time = 36.937 = 97% Global Time = 37.807 = 100% E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort>sha1sum_Microsoft_V16_32bit_Ox.exe KT3million.txt.Windows a053faa74ffb6cad41e61e273a1a0e0049cb25e7 KT3million.txt.Windows Volume in drive E is SSD_Sanmayce Volume Serial Number is 4C99-82D8 Directory of E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort 04/14/2012 02:01 AM . 04/14/2012 02:01 AM .. 04/14/2012 12:33 AM 187 Compile_Sandokan_Intel_32.bat 04/14/2012 12:33 AM 187 Compile_Sandokan_Intel_64.bat 04/14/2012 12:33 AM 194 Compile_Sandokan_Microsoft_32.bat 04/14/2012 12:33 AM 194 Compile_Sandokan_Microsoft_64.bat 04/14/2012 12:33 AM 989 GENERATE_3million_Knight-Tours_and_SORT_them.bat 04/14/2012 12:33 AM 1,169 GENERATE_40million_Knight-Tours_and_SORT_them.bat 04/14/2012 12:33 AM 1,632 KAZE prompt.lnk 04/14/2012 12:33 AM 24,490 Knight-tour_r8dump.c 04/14/2012 12:33 AM 73,728 Knight-tour_r8dump_Microsoft_V16_32bit_Ox.exe 04/14/2012 01:59 AM 390,000,000 KT3million.txt 04/14/2012 02:01 AM 390,000,000 KT3million.txt.Windows 04/14/2012 02:00 AM 390,000,000 QuickSortExternal_4+GB.txt 04/14/2012 12:33 AM 552,448 Sandokan_Logo.doc 04/14/2012 12:33 AM 301,406 Sandokan_Logo.pdf 04/14/2012 12:33 AM 1,314,534 Sandokan_Logo.png 04/14/2012 12:33 AM 170,085 Sandokan_QuickSortExternal_4+GB.c 04/14/2012 12:33 AM 114,688 Sandokan_QuickSortExternal_4+GB_32bit_Intel.exe 04/14/2012 12:33 AM 94,208 Sandokan_QuickSortExternal_4+GB_32bit_Microsoft.exe 04/14/2012 12:33 AM 122,368 Sandokan_QuickSortExternal_4+GB_64bit_Intel.exe 04/14/2012 12:33 AM 103,936 Sandokan_QuickSortExternal_4+GB_64bit_Microsoft.exe 04/14/2012 12:33 AM 9,458 sha1sum.c 04/14/2012 12:33 AM 49,152 sha1sum_Microsoft_V16_32bit_Ox.exe 04/14/2012 12:33 AM 4,096 Timer.exe 23 File(s) 1,172,939,149 bytes 2 Dir(s) 21,831,368,704 bytes free E:\Sandokan_r3-+++\Sandokan_r3_vs_Windows-sort> ]