home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / lisp / 2941 < prev    next >
Encoding:
Internet Message Format  |  1992-11-23  |  2.0 KB

  1. Xref: sparky comp.lang.lisp:2941 comp.lang.lisp.mcl:1668
  2. 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
  3. From: Espen J. Vestre <espen@coli.uni-sb.de>
  4. Newsgroups: comp.lang.lisp,comp.lang.lisp.mcl
  5. Subject: Re: remove
  6. Date: 23 Nov 1992 16:59:34 GMT
  7. Organization: Computerlinguistik, Universitaet des Saarlandes
  8. Lines: 26
  9. Distribution: world
  10. Message-ID: <1er2lmINNl0a@coli-gate.coli.uni-sb.de>
  11. References: <HALTRAET.92Nov20091121@monsun.si.no>
  12. NNTP-Posting-Host: mp-mac10.coli.uni-sb.de
  13. X-UserAgent: Nuntius v1.1.1d12
  14. X-XXMessage-ID: <A736CD59B9024453@mp-mac10.coli.uni-sb.de>
  15. X-XXDate: Mon, 23 Nov 92 17:03:05 GMT
  16.  
  17. In article <SIMON.92Nov23130108@liasg2.epfl.ch> Simon Leinen,
  18. simon@lia.di.epfl.ch writes:
  19. >Espen is correct in that Hallvard's REMOVE variant isn't
  20. >tail-recursive and may therefore cause problems with long lists.  One
  21. >could code an iterative tail-preserving version (which might be slower).
  22. >
  23. >But I did some benchmarking on Sun-4s under Allegro and CMU CL, and even
  24. >on longish lists (like 1000 elements or so), Hallvard's FASTER-REMOVE
  25. >performed better on the whole than the system-provided REMOVE versions.
  26. >I would bet that at least 90% of the uses of REMOVE would benefit from
  27. >using FASTER-REMOVE.
  28.  
  29. Yes, especially if you take into account that if you're using very long
  30. lists as your data structures, you are probably using the wrong kind of
  31. data structure.
  32. I guess a lot of programs might benefit even more from _memoizing_ the
  33. remove function, i.e. if the program is using remove to filter the same
  34. list again and again, it would benefit from knowing that, e.g., a given
  35. value isn't present in that list at all.
  36. --------------------------------------------------------------
  37. Espen J. Vestre,                          espen@coli.uni-sb.de
  38. Universitaet des Saarlandes,        
  39. Computerlinguistik, Gebaeude 17.2 
  40. Im Stadtwald,                          tel. +49 (681) 302 4501
  41. D-6600 SAARBRUECKEN, Germany           fax. +49 (681) 302 4351
  42. --------------------------------------------------------------
  43.