gcl-devel
[Top][All Lists]
Advanced

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

Re: [Gcl-devel] Re: (random tester) Another compiler side effects bug


From: Camm Maguire
Subject: Re: [Gcl-devel] Re: (random tester) Another compiler side effects bug
Date: 06 Nov 2003 11:25:04 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Greetings, Paul, and thank you once again for your very useful and
observant feedback.  Please excuse the delay, as I've been working on
the static function pointer option for ia64 stability.

This should now be fixed in 2.6.1 and cvs head.  I've still listed it
as a FIXME to investigate why this global *info* parameter is in there
in the first place.  If anyone wants to volunteer to look into it I'd
be most grateful.  For now I've taken the conservative approach and
protected the function info additions I've made with a ((*info*
(copy-info *info*)) in the lambda list of c1flet and c1abels.  If
anyone finds situations missed by this protection, I'd also be most
grateful for feedback/reports.  One can easily detect a problem like
this by investigating the structure compiler::*info* after a compile.
When working properly, it should look like this:

>compiler::*info*

#S(COMPILER::INFO COMPILER::CHANGED-VARS NIL COMPILER::REFERRED-VARS
      NIL TYPE T COMPILER::SP-CHANGE NIL COMPILER::VOLATILE NIL)

Take care,


"Paul F. Dietz" <address@hidden> writes:

> Camm Maguire wrote:
> 
> > OK, an example showing a notable compile time performance degradation
> > before vs. after the latest commit would be most helpful.  (You can
> > still access the cvs as of a certain date with the -D flag).  My guess
> > is that a trace of compiler::add-info would be illustrative.  If you
> > can send me a test function, I'll take a look at it.
> 
> Here's an example showing exponential growth (as a function of size of the
> function) in the compile time of certain functions in the current version.
> I have not run this in earlier versions, but it's alarming regardless.
> 
> (defun make-body (n)
>    (if (= n 0)
>        '(f x)
>      `(flet ((f (y) (f y))) ,(make-body (1- n)))))
> 
> (defun make-fn (n)
>    `(lambda (x) (flet ((f (z) z))
>                ,(make-body n))))
> 
>  >(time (compile nil (make-fn 4)))
> 
> Compiling gazonk1.lsp.
> End of Pass 1.
> End of Pass 2.
> OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3
> Finished compiling gazonk1.lsp.
> Loading gazonk1.o
> start address -T 0x89c62a0 Finished loading gazonk1.o
> real time : 0.190 secs
> run time  : 0.000 secs
> #<compiled-function COMPILER::CMP-ANON>
> 
>  >(time (compile nil (make-fn 5)))
> 
> Compiling gazonk1.lsp.
> End of Pass 1.
> End of Pass 2.
> OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3
> Finished compiling gazonk1.lsp.
> Loading gazonk1.o
> start address -T 0x89c6ab0 Finished loading gazonk1.o
> real time : 0.250 secs
> run time  : 0.090 secs
> #<compiled-function COMPILER::CMP-ANON>
> 
>  >(time (compile nil (make-fn 6)))
> 
> Compiling gazonk1.lsp.
> End of Pass 1.
> End of Pass 2.
> OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3
> Finished compiling gazonk1.lsp.
> Loading gazonk1.o
> start address -T 0x89c1730 Finished loading gazonk1.o
> real time : 0.580 secs
> run time  : 0.390 secs
> #<compiled-function COMPILER::CMP-ANON>
> 
>  >(time (compile nil (make-fn 7)))
> 
> Compiling gazonk1.lsp.
> End of Pass 1.
> End of Pass 2.
> OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3
> Finished compiling gazonk1.lsp.
> Loading gazonk1.o
> start address -T 0x89c1ca0 Finished loading gazonk1.o
> real time : 3.270 secs
> run time  : 3.030 secs
> #<compiled-function COMPILER::CMP-ANON>
> 
>  >(time (compile nil (make-fn 8)))
> 
> Compiling gazonk1.lsp.
> End of Pass 1.
> End of Pass 2.
> OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3
> Finished compiling gazonk1.lsp.
> Loading gazonk1.o
> start address -T 0x89c72c8 Finished loading gazonk1.o
> real time : 26.040 secs
> run time  : 25.720 secs
> #<compiled-function COMPILER::CMP-ANON>
> 
>  >
> 
>       Paul
> 
> 
> 
> 
> 
> _______________________________________________
> Gcl-devel mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/gcl-devel
> 
> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

[Prev in Thread] Current Thread [Next in Thread]