emacs-devel
[Top][All Lists]
Advanced

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

Re: cl.el sort* efficiency


From: Miles Bader
Subject: Re: cl.el sort* efficiency
Date: Sun, 24 Dec 2006 11:08:53 +0900

Kevin Ryde <address@hidden> writes:
> I see the common lisp spec specifically doesn't say how much or little
> the key is used.  Dunno what you get from implementations in practice.
> Is there a CL expert in the house?

I don't know how representative I am, but it's pretty obvious to me that
adding something like :key to sort might call the given function
multiple times.  Certainly the alternative of allocating storage to keep
around all retrieved key values is pretty heavyweight and in many cases
not an optimization at all, so it's not something I would expect an
implementation to do.

-Miles
-- 
`...the Soviet Union was sliding in to an economic collapse so comprehensive
 that in the end its factories produced not goods but bads: finished products
 less valuable than the raw materials they were made from.'  [The Economist]




reply via email to

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