guile-devel
[Top][All Lists]
Advanced

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

Re: goops and memoization


From: Tom Lord
Subject: Re: goops and memoization
Date: Tue, 3 Dec 2002 18:38:15 -0800 (PST)

       >> One could think of the possibility to add hooks for adding arbitrary
       >> optimization functions, but this is just an idea.

       > That is an exciting idea.  It would be wonderful to be able to specify
       > code re-writing rules such as:

       > (map foo (map bar ls)) --> (map (lambda (x) (foo (bar x))))

That is not, in general, a valid optimization.

Additionally, only a newbie would write it the "wrong" way unless they
specifically wanted the effects that the bogus optimization would
break or knew that speed was not an issue for this expression.  If you
mean that nested maps arise out of some higher-level code generation
for which the optimization is known to be valid -- then you'd want to
express the optimization in terms of that higher-level notation.

-t




reply via email to

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