guile-user
[Top][All Lists]
Advanced

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

Re: Uniq list in Guile


From: Ian Price
Subject: Re: Uniq list in Guile
Date: Sat, 26 Oct 2013 11:16:15 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

Dmitry Bogatov <address@hidden> writes:

> 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. 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.

-- 
Ian Price -- shift-reset.com

"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"



reply via email to

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