Hi bplus,
here comes a showdown (based on your code):
You can see that sometimes using SHELL with superfast sorter (both in EXE/ELF) is way to go EVEN when the data is passed via a file?!
Sometimes, sorting strings is an extra burden since they can come from a file, we need to load and parse them before sorting, in my tweak to your code, you can see three more approaches:
here comes a showdown (based on your code):
You can see that sometimes using SHELL with superfast sorter (both in EXE/ELF) is way to go EVEN when the data is passed via a file?!
Sometimes, sorting strings is an extra burden since they can come from a file, we need to load and parse them before sorting, in my tweak to your code, you can see three more approaches:
Code: (Select All)
'Benchmark (sorting 3,000,000 strings, up to 62 chars) on Windows 10 and i5-7200U 3.1GHz Max Turbo:
' Quicksort recursive: 8.16s
' Quicksort iterative: 7.54s
' Quicksort 'Magnetica': 4.22s
' Quicksort multithreaded Magnetica: 1.82s
"He learns not to learn and reverts to what the masses pass by."