From: ludo@gnu.org (Ludovic Courtès)
To: guile-user@gnu.org
Subject: Re: Uniq list in Guile
Date: Sun, 27 Oct 2013 01:14:13 +0200 [thread overview]
Message-ID: <871u37hbga.fsf@gnu.org> (raw)
In-Reply-To: 87vc0kbamo.fsf@Kagami.home
Ian Price <ianprice90@googlemail.com> 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’.
prev parent reply other threads:[~2013-10-26 23:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-26 7:12 Uniq list in Guile Dmitry Bogatov
2013-10-26 8:03 ` Panicz Maciej Godek
2013-10-26 9:06 ` Thien-Thi Nguyen
2013-10-26 12:05 ` Dmitry Bogatov
2013-10-26 10:16 ` Ian Price
2013-10-26 23:14 ` Ludovic Courtès [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871u37hbga.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).