Author Topic: Steve's MEM Sort program - any limitations?  (Read 2705 times)

0 Members and 1 Guest are viewing this topic.

Offline Richard

  • Seasoned Forum Regular
  • Posts: 364
    • View Profile
Steve's MEM Sort program - any limitations?
« on: March 09, 2020, 11:02:49 pm »
I will soon try Steve's MEM Sort...

Any limitations (except for available memory)?

Suppose I had variable length strings which I can easily (?) convert to fixed length strings using CHR$(0) padding at the end of the string - so say each string is 1024 (1k) bytes long.

In a 32 Gbyte RAM computer, suppose that I can arrange that 10 Gbyte is available.

Can I have   10 Gbyte \ (1 Kbytes) = 10 M strings that can be sorted - even more strings if of shorter length?

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Steve's MEM Sort program - any limitations?
« Reply #1 on: March 09, 2020, 11:07:36 pm »
I will soon try Steve's MEM Sort...

Any limitations (except for available memory)?

Suppose I had variable length strings which I can easily (?) convert to fixed length strings using CHR$(0) padding at the end of the string - so say each string is 1024 (1k) bytes long.

In a 32 Gbyte RAM computer, suppose that I can arrange that 10 Gbyte is available.

Can I have   10 Gbyte \ (1 Kbytes) = 10 M strings that can be sorted - even more strings if of shorter length?

If you have memory for them, it’ll sort them.  The main limitation is you have to pass it _MEM enabled data.  If it won’t work with _MEM (such as with variable length strings), it won’t work with MEMSORT.
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!