Login
Back to forumReply to this topicGo to last reply

Posted By

Litwr
on 2021-06-19
02:08:25
 A new utility that helps handle Basic strings

I have adapted my quicksort routine to work with Basic strings. QSort-Plus4 is very fast. Try to run it and find out that it is actually fast. happy IMHO it is the fastest string sorting utility in the whole 8-bit world.
BTW a lot of thanks to SVS for his Ultimate Map - it helped me very much.

Posted By

George
on 2021-06-20
09:51:19
 Re: A new utility that helps handle Basic strings

Thank you for sharing. This will be useful for sure in future. And I appreciate your efforts you put in this.
We should put this kind of routines in a special knowledge base for easy finding.

Posted By

Litwr
on 2021-07-10
03:05:08
 Re: A new utility that helps handle Basic strings

Thank you for your remark. IMHO the category "Utility/Programming" (sl/305) is a good place for this utility and it is actually placed there.
I made this utility because I wanted to test how good were the best sorting programs for the c64 from the 80s - the details are here (https://www.lemon64.com/forum/viewtopic.php?t=77937).
BTW testing on the C64 shows that C64 Basic has a very poor garbage collector. One even call it buggy because it effectively prevents the intensive use of strings. For example, the C64 needs almost 2.5 hours (150 minutes!) just for filling a test array of 4000 strings! The C+4 needs only about 10 minutes for this task, it can fill 5500 strings (this is its memory limit) for only 13 minutes. So I can't help but admire people efforts that made Basic 3.5 so much better than C64 Basic.
EDIT. Everything has its price. The better C+4 garbage collector requires two more bytes for every string. It was my miss that I didn't correct those additional bytes after sorting. I just used the C64 code which doesn't require such a correction. :( Now C+4 is fixed and I was even able to make it slightly faster. BTW maybe we need one more software category - Utility/Basic-Programming ? We have a lot of tools which enhance Basic somehow.



Back to topReply to this topic


Copyright © Plus/4 World Team, 2001-2024