In message <5d33…@sick-of-spam.invalid> Bob Latham <b…@sick-of-spam.invalid> wrote:
> A music library scan tool I've written produces a list of over 4000 > lines, each line shows the path to a particular album. But the filer > does not list in alphabetic order...
??? Is the list a text file?
> There are two sort types I understand; Bubble sort and what I call > "Best So Far" but I bet there is a different official name.
> I've always gone for bubble sort for two reasons, firstly I > understand the principle and it does not require another chunk of ram > to hold the result file. But using this method takes 12.6 seconds.
> The "Best So Far" method is to repeatedly pass through the source > file and pick out the best line on each pass and move it out to > another store and mark it as used in the source. I had the idea of > squirting these best lines one at a time to a file on disc rather > than provide temporary ram.
> I realised that using OS_BPut, line by line was not going to be as > fast as saving a file in one go but tried it anyway. It took 6 > seconds. Faster yes but I don't like it, the sorted file never exists > in the application. True it doesn't matter but it kind of does to me.
> Anyone got any suggestions for a better approach? Something I might > even understand?
> A slight complication, any sort would need to handle is the Céline > Dion problem. I like treating é as e as regards the sort comparison > stage.
Thanks for Céline :-)
> Also, how is StrongEd so lightning fast on sorts? It barely blinks.
Yes, but failed with Céline... with capital letters Céline => CÉLINE, ko too
> Still coded in Basic Assembler, in case you need to know.
good luck!
> Thanks.
> Bob.
-- Jean-Michel