From: Christophe R. <cs...@ca...> - 2013-03-12 07:44:38
|
Richard Fateman <fa...@ee...> writes: > which is somewhat mysterious. > I've tried inserting into the (let ...) various declarations, eg. > (declare (optimize (speed 0)(safety 3))) > > without effect. > > Any thoughts? I think the declaration that you need is (notinline /). The problem, I think, is that unlike the top-level call to bracket, the let expression is "complicated" enough to invoke the full compiler, which merrily observes that one and ten are compile-time constants and propagates them through to the call to / -- which is a nice pure function which can be constant-folded. Of course, / is only an almost pure function -- in the presence of changes to the rounding mode it really isn't. Arguably we should never constant-fold inexact floating-point computations for this reason, but... in the absence of such a radical change in compiler policy, telling the compiler not to treat / as inline inhibits the constant-folding. Best, Christophe |