Vadim Zhynikov's ideas [about memory]



On Saturday 20 October 2001 03:33, you wrote:

> About the "hard way" of compiling gcl and maxima :
> it would be a nice idea to include Vadim Zhynikov's ideas
> in a recent post and a clarification on how to handle
> the memory.

I compiled maxima-gcl with a higher MAXPAGE and used Vadims init.lsp, i.e. 

(progn
(si::allocate 'cons 20000 t)
(si::allocate 'fixnum 4000 t)
(si::allocate-relocatable-pages 10000 t)
(si::allocate 'cfun 5000 t)
(si::set-gmp-allocate-relocatable t)
(setq  si::*notify-gbc*  t))

Then I tried to find out how fast this new version would be. I used 

factor(expand((x+y)^n)+1)$

for n=30, 60, 100, and 105. With 100 maxima (gcl) run into serious problems:

(C7) factor(expand((x+y)^100)+1)$

[GC for 7500 RELOCATABLE-BLOCKS pages..(T=12).GC finished]
[GC for 5000 CFUN pages..(T=15).GC finished]
[GC for 7500 RELOCATABLE-BLOCKS pages..(T=15).GC finished]
[GC for 5000 CFUN pages..(T=15).GC finished]
[GC for 5000 CFUN pages..(T=15).GC finished]
[GC for 7500 RELOCATABLE-BLOCKS pages..(T=13).GC finished]
[GC for 5000 CFUN pages..(T=14).GC finished]
[GC for 5000 CFUN pages..(T=15).GC finished]
[GC for 7500 RELOCATABLE-BLOCKS pages..(T=12).GC finished]
etc

I had to interrupt it. The reason was 
(si::set-gmp-allocate-relocatable t)

without this line, the times were:
n=30: 0.7 sec; n=60: 4.04 sec; n=100: 4.07 sec; n=105: 317.27 sec
That was with 121 M Ram in use.

Now the numbers for clisp:
n=30: 0.58 sec (4.5 M RAM); n=60:  5.45 sec (4.8 M); n=100: 11.79 sec (4.6 
M); n=105: 60.89 sec (5.2 M);

And cmucl:
n=30: 0.15 sec (11 M RAM); n=60:  2.19 sec (12 M); n=100: 5.05 sec (15 M); 
n=105: 28.51 sec (17 M);

The numbers for RAM were what I could observe in top as RSS, of course that's 
not very precise. There's one point I don't understand: cmucl loads a 
"maxima.core" with 

Jürgen