Article View: comp.sys.acorn.programmer
Article #7Re: Sorting algorithms
From: Jean-Michel
Date: Fri, 06 Nov 2026 16:30
Date: Fri, 06 Nov 2026 16:30
50 lines
3045 bytes
3045 bytes
In message <5d336712aebob@sick-of-spam.invalid>
Bob Latham <bob@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
Technical Details
Message-ID:
<1db391335d.jmb@jmc.bruck.orange.fr>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<5d336712aebob@sick-of-spam.invalid>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Jean-Michel <jmc.bruck@orange.fr> Newsgroups: comp.sys.acorn.programmer Subject: Re: Sorting algorithms Date: Fri, 06 Nov 2026 17:30:51 +0100 Organization: Jean-Michel Lines: 50 Message-ID: <1db391335d.jmb@jmc.bruck.orange.fr> References: <5d336712aebob@sick-of-spam.invalid> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Date: Fri, 06 Nov 2026 16:33:10 +0000 (UTC) Injection-Info: dont-email.me; logging-data="2841298"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/aXtAA3N9Ac+97WDXE41ugvTlsWXDYn2Y="; posting-host="4ba4a673a7ee735a4d8619b1b1e1b823" User-Agent: Messenger-Pro/9.03 (MsgServe/9.03) (RISC-OS/5.31) NewsHound/v1.53-32 RC1 Cancel-Lock: sha1:wICVAIdv12cwXv8tJ6RyTaD+Y2s= sha256:/hd4iqTeSQuy3O2x7e3RVrQEcOTuxIw1ofhHV0+LjTA= sha1:812Q5vqZ4VzJhYjO8UPqpgLKqPk= sha256:Wxv86j2wKPQg1Hjm+KuP/gdgrYLtg+xamQVnsJlfm7w= X-Editor: EmailEdit 2.04