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

Re: A whole bunch of bug reports and patches

>   And back to one more optimization question; probably by far the biggest
>   one of all: is there any way to optimize the MOVE-FROM-SINGLE (cost 13)
>   that always happens when a declared single-float value is returned from
>   a function or block?
>Well, block compilation is one answer (which you may have already
>explored.)  Another approach is to return the float in a pre-allocated
>float array.  I don't have any optimizations of this waiting in the wings.

Darn (this problem really eats up my simulations).  Block compilation
wouldn't really work for my purposes, which is mostly for return values
for PCL methods (my application is a neural network simulator).  Maybe
there is a simple way you can optimize this for cases that come up fairly
often in this context, and I would guess in any other PCL program doing
numeric operations:  the case where a value is declared as a SINGLE-FLOAT,
but no numeric operations are actually performed on it.  Many times such
methods will end up with method-functions looking like:

#'(lambda (self) (function-returning-single-float self))
#'(lambda (self)
    (if cond
	(function2-returning-single-float self)

Would it be a simple modification, in cases like this, to have the compiler
bypass the registers altogether, and thereby avoid the consing?

And thanks much for the SOURCE-CONTEXT patch for PCL; it works like a
charm.  I put the pcl DEFMETHOD-specific one in PCL's cmu-low.lisp, which
is probably a natural place for it.

- Trent