lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Alphabetised table of contents?


From: Jean Abou Samra
Subject: Re: Alphabetised table of contents?
Date: Wed, 21 Sep 2022 12:56:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1

Le 21/09/2022 à 10:10, Thomas Morley a écrit :
There's also:
https://lsr.di.unimi.it/LSR/Item?id=763



Thanks for the link! I didn't know that snippet.

Just a note: at some point there is

       (set! index-item-list
       ;; We insert index items sorted from the beginning on and do
       ;; not sort them later - this saves pretty much computing time
       (insert-alphabetical-sorted! (list label markup-symbol text sorttext)
       index-item-list))

This is unlikely to save computing time, since it's doing an
insertion sort, O(n^2), where as Guile's sort function (and
any optimal sort algorithm) is O(n (log n)).

Cheers,
Jean




reply via email to

[Prev in Thread] Current Thread [Next in Thread]