John Porter <[EMAIL PROTECTED]> writes:
> If the user-supplied key extraction function is tagged with
> :function/:pure (or whatever), then perl is free to optimize
> the operation of sort() by memoizing the results of calls to
> that function.
I'd really like to see a concrete example of a sane sorting function which
cannot be memoized. (Issues of syntax aside; just caching the result of
comparing any two pairs of data results in caching data that a sane
sorting algorithm will never use again. But provided that there's a way
to separate things out so that Perl *can* usefully memoize, I can't think
of any realistic sort function where this would be a problem.)
--
Russ Allbery ([EMAIL PROTECTED]) <http://www.eyrie.org/~eagle/>