On Wed, 2004-07-14 at 17:19, Camm Maguire wrote:
> Greetings!
>
> May I please suggest one more item prerelease? The function
> proclamation in maxima for gcl is completely disabled at present,
> leading to highly suboptimal compiles.
I'm glad you brought this up. I was convinced a long time ago that the
way we were dealing with sys-proclaim.lisp was suboptimal. However, I
didn't really understand the issues involved and things seemed to be
working well enough without it, so I put it off.
Now, with the help of the instructions you gave, I have done some
testing. I didn't want to mess with the makefiles yet, so I did manual
compiles. I also emptied SYS-DECLAIM.LISP to make sure that the contents
were not somehow interfering with the rest of the process.
Test 1: old way
%rm -r binary-gcl
%mkdir -p binary-gcl/numerical/slatec
%gcl
(load "../lisp-utils/defsystem.lisp")
(mk::oos "maxima" :compile :verbose t)
(quit)
%gcl
(load "../lisp-utils/defsystem.lisp")
(mk::oos "maxima" :load :verbose t)
(when (fboundp
(quote si::sgc-on))
(si::sgc-on t))
(si:save-system "binary-gcl/maxima")
%time ./compile-oldway >& oldlog
real 3m12.840s
user 2m53.280s
sys 0m11.280s
%ls -l binary-gcl/maxima
-rwxr-xr-x 1 amundson users 28742253 Jul 14 19:52
binary-gcl/maxima
I then ran "make check" five times to get timing from the test suite.
The final result: 4.116 +- 0.074 seconds.
Test 2: new way
%rm -r binary-gcl
%mkdir -p binary-gcl/numerical/slatec
%gcl
(load "../lisp-utils/defsystem.lisp")
(compiler::emit-fn t)
(mk::oos "maxima" :compile :verbose t)
(compiler::make-all-proclaims "*/*/*.fn" "*/*/*/*/*.fn")
(quit)
%rm -r binary-gcl
%mkdir -p binary-gcl/numerical/slatec
%gcl
(load "../lisp-utils/defsystem.lisp")
(load "sys-proclaim.lisp")
(mk::oos "maxima" :compile :verbose t)
(quit)
%gcl
(load "../lisp-utils/defsystem.lisp")
(load "sys-proclaim.lisp")
(mk::oos "maxima" :load :verbose t)
(when (fboundp
(quote si::sgc-on))
(si::sgc-on t))
(si:save-system "binary-gcl/maxima")
(quit)
%time ./compile-newway >& newlog
real 6m26.144s
user 5m46.790s
sys 0m22.100s
%ls -l binary-gcl/maxima
-rwxr-xr-x 1 amundson users 28799597 Jul 14 20:26
binary-gcl/maxima
I then again ran "make check" five times to get timing from the test
suite. The final result: 4.104 +- 0.050 seconds.
It seems to me that the new way takes twice as long as the old way and
produces an infintesimally larger binary that runs at the same speed. In
what way would the new way be optimal? Admittedly, the test suite is not
the best time benchmark possible. Have I made a mistake in the above? I
also looks difficult to guarantee that incremental compiles work
properly in all cases. Do you see how to do that? I have been trying to
keep as much of the build functionality in defsystem (and out of make)
as possible.
Any insight?
--Jim