1 Dec 2011 18:33
Re: compile function v. dynamic eval of defun
Stig Hemmer <stighemmer <at> gmail.com>
2011-12-01 17:33:06 GMT
2011-12-01 17:33:06 GMT
Your make-rk4-model returns a LIST of two lambdas. The calling function then tries to pick these apart using MULTIPLE VALUES. Either return multiple values using VALUES or pick apart the list using DESTRUCTURING-BIND. Stig Hemmer On 11/30/11, billpeople <at> mindspring.com <billpeople <at> mindspring.com> wrote: > Thanks for your rapid reply. > > I realize a reproducible test case is what you need to go further, and I'll > try to develop that - and I'll move to 1.0.53 as well as trying this on a > linux box. > > That said, I was trying to establish whether I should expect different > results (or if this is a known issue) from the two different methods of > producing a compiled function dynamically, hence showing the compilations > are made in essentially identical lexical environments, and that the code > being compiled is basically identical. > > To directly answer your question on EQUATION-AGGREGATOR, here's the source, > and in this case, fn is bound to #'+: > > (defun equation-aggregator (fn &rest args) > (declare (optimize (speed 3) (safety 0))) > (let ((tmp (delete nil args))) > (if tmp > (reduce fn tmp) > 0d0)))(Continue reading)
RSS Feed