Re: feature request from r5rs
Matthias Radestock <[email protected]>
| Newsgroups | gmane.comp.java.sisc.devel |
|---|---|
| Message-ID | <[email protected]> |
[email protected] wrote: > On Wed, Jun 11, 2003 at 09:27:06AM -0400, Narang wrote: > >>1st caveat I agree with but the other two caveats are also true for >> >>(+ (force (delay (* 3 7)) 13) ===> 34 > > > Oh right, as for efficiency, if it was supported by the compiler, and > introduced as a new uexp, it shouldn't affect performance anywhere else. How? A better example to the above is: (let ((v (delay * 3 4))) (+ v 13)) The compiler doesn't know (in the general case) that v is delayed, so it cannot omit special code to force it. This decision needs to be made at runtime, e.g. by examining whether any of the arguments need forcing. Of course then the question is *when* you force a value. When it appears as an argument *anywhere*? That wouldn't be very useful. When calling primitives? Perhaps, although even that might not be quite good enough. Matthias. ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com.