home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.lisp:2941 comp.lang.lisp.mcl:1668
- Path: sparky!uunet!usc!sol.ctr.columbia.edu!ira.uka.de!sbusol.rz.uni-sb.de!coli.uni-sb.de!mp-mac10.coli.uni-sb.de!espen
- From: Espen J. Vestre <espen@coli.uni-sb.de>
- Newsgroups: comp.lang.lisp,comp.lang.lisp.mcl
- Subject: Re: remove
- Date: 23 Nov 1992 16:59:34 GMT
- Organization: Computerlinguistik, Universitaet des Saarlandes
- Lines: 26
- Distribution: world
- Message-ID: <1er2lmINNl0a@coli-gate.coli.uni-sb.de>
- References: <HALTRAET.92Nov20091121@monsun.si.no>
- NNTP-Posting-Host: mp-mac10.coli.uni-sb.de
- X-UserAgent: Nuntius v1.1.1d12
- X-XXMessage-ID: <A736CD59B9024453@mp-mac10.coli.uni-sb.de>
- X-XXDate: Mon, 23 Nov 92 17:03:05 GMT
-
- In article <SIMON.92Nov23130108@liasg2.epfl.ch> Simon Leinen,
- simon@lia.di.epfl.ch writes:
- >Espen is correct in that Hallvard's REMOVE variant isn't
- >tail-recursive and may therefore cause problems with long lists. One
- >could code an iterative tail-preserving version (which might be slower).
- >
- >But I did some benchmarking on Sun-4s under Allegro and CMU CL, and even
- >on longish lists (like 1000 elements or so), Hallvard's FASTER-REMOVE
- >performed better on the whole than the system-provided REMOVE versions.
- >I would bet that at least 90% of the uses of REMOVE would benefit from
- >using FASTER-REMOVE.
-
- Yes, especially if you take into account that if you're using very long
- lists as your data structures, you are probably using the wrong kind of
- data structure.
- I guess a lot of programs might benefit even more from _memoizing_ the
- remove function, i.e. if the program is using remove to filter the same
- list again and again, it would benefit from knowing that, e.g., a given
- value isn't present in that list at all.
- --------------------------------------------------------------
- Espen J. Vestre, espen@coli.uni-sb.de
- Universitaet des Saarlandes,
- Computerlinguistik, Gebaeude 17.2
- Im Stadtwald, tel. +49 (681) 302 4501
- D-6600 SAARBRUECKEN, Germany fax. +49 (681) 302 4351
- --------------------------------------------------------------
-