On Fri, 2003-09-05 at 03:13, Gerd Moellmann wrote:
> Adam Warner <[EMAIL PROTECTED]> writes:
> 
> > Now try this speed test:
> > (compile-file "matrix.lisp") (compile-file "matrix2.lisp") (load "matrix.x86f") 
> > (time (main)) (load "matrix2.x86f") (time (main2))
> > 
> > On my system (CMUCL current on x86) matrix2 is consistently slower. It
> > is not obvious why this should so because of the global
> > proclamation.
> 
> I performed exactly the steps you describe, and get
> 
> CL-USER ==> (time (main))
> 270165 1061760 1453695 1856025
> 
> ; Evaluation took:
> ;   3.16 seconds of real time
> ;   3.112721 seconds of user run time
> ;   0.0 seconds of system run time
> ;   5,352,395,192 CPU cycles
> ;   0 page faults and
> ;   13,536 bytes consed.
> ; 
> nil
> CL-USER ==> (l "/tmp/matrix2")
> t
> CL-USER ==> (time (main2))
> 270165 1061760 1453695 1856025
> 
> ; Evaluation took:
> ;   3.13 seconds of real time
> ;   3.103055 seconds of user run time
> ;   0.0 seconds of system run time
> ;   5,311,413,260 CPU cycles
> ;   0 page faults and
> ;   13,536 bytes consed.

Thanks for the test. When I compared the assembly code main2 was two
instructions shorter. It is entirely plausible that main2 could be the
same speed or faster on your processor but slower on mine.

Could you possibly disassemble main and main2 so I can compare them? If
the assembly code instructions are not the same (apart from different
absolute addresses) then there is likely a (perhaps harmless) bug in the
compiler. 

Thanks,
Adam


Reply via email to