From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.user Subject: Re: Uniq list in Guile Date: Sun, 27 Oct 2013 01:14:13 +0200 Message-ID: <871u37hbga.fsf@gnu.org> References: <87d2mspkt3.fsf@gnu.org> <87vc0kbamo.fsf@Kagami.home> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1382855570 13465 80.91.229.3 (27 Oct 2013 06:32:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 27 Oct 2013 06:32:50 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Oct 27 07:32:54 2013 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VaJu7-0002fq-P2 for guile-user@m.gmane.org; Sun, 27 Oct 2013 07:32:51 +0100 Original-Received: from localhost ([::1]:36880 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VaJu7-000442-9X for guile-user@m.gmane.org; Sun, 27 Oct 2013 02:32:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45035) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VaD3y-0007bq-8p for guile-user@gnu.org; Sat, 26 Oct 2013 19:14:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VaD3s-0003Le-EV for guile-user@gnu.org; Sat, 26 Oct 2013 19:14:34 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:34937) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VaD3s-0003LV-7w for guile-user@gnu.org; Sat, 26 Oct 2013 19:14:28 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VaD3o-0006qV-Ka for guile-user@gnu.org; Sun, 27 Oct 2013 01:14:24 +0200 Original-Received: from reverse-83.fdn.fr ([80.67.176.83]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 27 Oct 2013 01:14:24 +0200 Original-Received: from ludo by reverse-83.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 27 Oct 2013 01:14:24 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 28 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: reverse-83.fdn.fr X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 6 Brumaire an 222 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu User-Agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:7hvGUYqxLDwwbipNj5+ofmWNKFE= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-Mailman-Approved-At: Sun, 27 Oct 2013 02:32:09 -0400 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:10861 Archived-At: Ian Price 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’.