[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] compile time wanderings
From: |
Cs. Henk |
Subject: |
[Chicken-users] compile time wanderings |
Date: |
Wed, 16 Jun 2004 02:32:40 +0200 |
User-agent: |
Mutt/1.5.6i |
Hi!
I tested the compilation of the following kind of code:
(define (f0) 0)
(define (f1) (+ 1 (f0)) )
(define (f2) (+ 1 (f1)) )
(define (f3) (+ 1 (f2)) )
(define (f4) (+ 1 (f3)) )
(define (f5) (+ 1 (f4)) )
...
(display (f1000)) (newline)
with different values in place of 1000.
First I tried to do it with 10000, I got bored after some hours, so I
stopped the compilation.
Then trying it with 1000, 2000, and 3000, I had the feeling that compile
time grows exponentially (for 1000, the code compiled in cca. 40 sec
time, for 2000, it needed 2 minutes, for 3000, it took cca. 5 and a half
minutes).
And then I re-tried the above with 10000 as follows: broke up the code
to 1000-line chunks, compiled them separately, linked the object files.
This procedure, of course, took ten times longer than the compilation
time with 1000.
Now I wonder what property of chichken causes that compilation time
grows exponentially related to code size, and that is there a way to
make it behave similary during the compilation of one big file
to the case when several small files are compiled and linked... ?
Thanks,
Csaba
- [Chicken-users] compile time wanderings,
Cs. Henk <=