Comb Sort versus Quick Sort
#8
I don't see any issues with what I shared.
In this new package, I tarred the package to preserve the executability of ELF, also I changed your DIMs with single REDIM, and to make everything fair, before each sort I reread the string pool from a file.

So, the benchmark is done on my main laptop running both Fedora 36 and Windows 10:


All in all, several practical tecniques are explored in this package.

- Avoiding allocating multiple string arrays, since this choke QB64 and makes it frozen?! Try 30 million strings <63 bytes, which is < 2GB;
- Loading via BINARY mode with LINE INPUT;
- Loading via single GET and parsing the chunk within QB64;
- Invoking C written Quicksort;
- Invoking external code via SHELL.

The limitations of 2GB combined with internal string movements prompts for using non-QB64 code, when 30[+] million strings are to be sorted.


Attached Files Image(s)
       

.zip   QB64_qsort_added-missing-header_3+30_million.zip (Size: 1.67 MB / Downloads: 47)
"He learns not to learn and reverts to what the masses pass by."
Reply


Messages In This Thread
Comb Sort versus Quick Sort - by bplus - 05-30-2023, 07:06 PM
RE: Comb Sort versus Quick Sort - by Dimster - 05-31-2023, 02:00 PM
RE: Comb Sort versus Quick Sort - by bplus - 05-31-2023, 02:39 PM
RE: Comb Sort versus Quick Sort - by Sanmayce - 07-11-2023, 04:34 PM
RE: Comb Sort versus Quick Sort - by bplus - 07-12-2023, 12:27 AM
RE: Comb Sort versus Quick Sort - by Sanmayce - 07-12-2023, 02:28 PM
RE: Comb Sort versus Quick Sort - by bplus - 07-12-2023, 02:58 PM
RE: Comb Sort versus Quick Sort - by Sanmayce - 07-13-2023, 07:28 PM
RE: Comb Sort versus Quick Sort - by Sanmayce - 07-13-2023, 07:31 PM
RE: Comb Sort versus Quick Sort - by bplus - 07-13-2023, 09:17 PM
RE: Comb Sort versus Quick Sort - by SMcNeill - 07-13-2023, 10:00 PM
RE: Comb Sort versus Quick Sort - by Sanmayce - 07-14-2023, 01:21 PM
RE: Comb Sort versus Quick Sort - by SMcNeill - 07-14-2023, 02:10 PM
RE: Comb Sort versus Quick Sort - by bplus - 07-14-2023, 01:35 PM



Users browsing this thread: 2 Guest(s)