[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Uniq list in Guile
From: |
Ludovic Courtès |
Subject: |
Re: Uniq list in Guile |
Date: |
Sun, 27 Oct 2013 01:14:13 +0200 |
User-agent: |
Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux) |
Ian Price <address@hidden> skribis:
>> Hello!
>>
>> Recently I faced neseserity to uniq list in Guile. Surprised, that I
>> did not found ready solution, I decided to prepare it.
> It's not really that common.
+1 (I’ve never needed it, FWIW.)
> I wrote my own "uniq" (which is a terrible name unix has inflicted on
> us) a long while back, and I think I've used it exactly once. By
> contrast, I use shuffle (also not in the standard library) fairly
> often, and I got that one shot down.
>
>> By analogy with sorting functions in `sort.c` I prepared
>> `uniq.c`(attached, but unfinished patch, lacking proper documentation).
>> But after I became curious, how slower would be Scheme version with
>> (set-cdr!). To my test (random list of small integers) it is about twice
>> as slow.
>>
>> Is Guile Mainline interested in these routines, and if yes, does in your
>> opinion doubling execution speed worth resorting to C hacking?
> Without an actual benchmark, no.
Agreed.
Ludo’.