[Ecls-list] Critical bug
Juan Jose Garcia-Ripoll
jjgarcia at users.sourceforge.net
Sat Dec 22 11:09:31 UTC 2007
On 21 Dec 2007 19:38:15 -0600, Gabriel Dos Reis <gdr at cs.tamu.edu> wrote:
> "Juan Jose Garcia-Ripoll" <jjgarcia at users.sourceforge.net> writes:
> | Hi,
> | I have fixed a long standing bug in ECL. Namely, C variables in
> | compiled code were not always declared volatile. As of now, when a
> | function uses setjmp(), all variables, including function arguments,
> | are declared volatile and thus their value is preserved during calls
> | of THROW, GOTO, etc.
> Hi Juanjo,
> Should we expect a possible performance decrease from this patch, or
> it should be in the noise?
There should be no significant performance decrease. The declarations
of type "volatile" only happen in a function in which you have used
CATCH, UNWIND-PROTECT or some kind of very nonlocal TAGBODY or BLOCK
(i.e. the kind where GOTO or RETURN are used from within closure
functions). All these sittuations do not happen in code where
performance is critical.
Furthermore "volatile" simply tells the compiler that certain
variables should _also_ be stored on the stack. In other words, what a
simple-minded compiler would do. And accessing the stack is not so
slow anyway: there are much more critical bottlenecks in lisp code,
such as the boxing/unboxing of values.
Facultad de Fisicas, Universidad Complutense,
Ciudad Universitaria s/n Madrid 28040 (Spain)
More information about the ecl-devel