🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.acorn.programmer
Article #17

Re: Sorting algorithms

#17
From: Paul Sprangers
Date: Wed, 11 Nov 2026 18:25
27 lines
2154 bytes
In article <5d3628e1b7News04@avisoft.f9.co.uk>,
   Martin <News04@avisoft.f9.co.uk> wrote:

> As a specific example, it works but does have some limitations.
> The most obvious one is that any characters not included in FNcase are
> omitted from the sort key completely (eg blank or hyphen). 

You're right, Martin. But it is deliberate indeed. I should have mentioned
that the program sorts lines *alphabetically*, reason why it omits
characters like spaces, hyphens, dots, colons etc. completely.

I also left out ArmSort, because I wanted to show code that does it all by
its self.

> I suspect however that as FNcase tests each character 29 times, it could
> be optimised.

Absolutely. My database program sorts the same 6000 lines in a fraction of
a second, font painting the result on screen included. But hm... I should
wade through the rivers of code for finding out how I did that. And even
then I'm afraid that I would no longer understand it.
Oh youth, thou treacherous promise!

Paul

-- 
https://riscos.sprie.nl
Technical Details
Message-ID: <5d362f6206Paul@sprie.nl>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <5d336712aebob@sick-of-spam.invalid> <5d3622ac84Paul@sprie.nl> <5d3628e1b7News04@avisoft.f9.co.uk>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Paul Sprangers <Paul@sprie.nl>
Newsgroups: comp.sys.acorn.programmer
Subject: Re: Sorting algorithms
Date: Wed, 11 Nov 2026 19:25:34 +0100 (Custom)
Organization: None
Lines: 27
Message-ID: <5d362f6206Paul@sprie.nl>
References: <5d336712aebob@sick-of-spam.invalid> <5d3622ac84Paul@sprie.nl> <5d3628e1b7News04@avisoft.f9.co.uk>
Injection-Date: Wed, 11 Nov 2026 18:25:47 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="3457363"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+kWMwL2I0vfd+qWukqCb8RGA5teZSfDD0="; posting-host="e144510d219e3c252735c723c065e6c7"
User-Agent: Pluto/3.20 (RISC OS/5.31) NewsHound/v1.54
Cancel-Lock: sha1:S/5xcHHqjCIrFyCsy0QP2ph7CnM= sha256:EplhmfD2zbOglXBLtx6NiuRVpUZ6BXwoGezTJRw5Dm4=
	sha1:bgLDuR28fFfJhbrEJrz3XEelaQ0= sha256:d50IODjhqhEZynIRaVL1xmXgLY+I/l6uLj6IBgUatHI=