chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] problems with datatype and eopl 3-5


From: Zbigniew
Subject: Re: [Chicken-users] problems with datatype and eopl 3-5
Date: Sat, 21 Apr 2007 16:41:04 -0500

I can't answer your first question, unfortunately.  But I can try
answering your second.  Scheme48 generates bytecode that runs on a
highly-tuned virtual machine, and is geared for interpretation.
Chicken generates very fast compiled C code but interpretation is
relatively slow, sometimes very slow.

I ran your test (using define-datatype.scm because of the issue you
noted) in a couple different ways and got the following results on my
machine:

1. interpretation only, exactly as you specified:  2.279 seconds
2. compiled main code, interpreted 3-5.scm: 0.184 seconds
3. all code compiled:  0.043 seconds

To try this first create eopl.scm (compiled main code):

cat > eopl.scm <<EOF
(include "r5rs.scm")
(include "sllgen.scm")
(include "test-harness.scm")
(include "test-suite.scm")
EOF
csc -O2 -s eopl.scm

Then in csi:
(use eopl)
(use syntax-case)
(load "define-datatype.scm")
(load "3-5.scm")
,t (run-all)            ; 0.184 seconds

Now compile the 3-5 code too:

cat > run-3-5.scm <<EOF
(use eopl)
(use syntax-case)
(include "define-datatype.scm")
(include "3-5.scm")
EOF
csc -s -O2 run-3-5.scm

Then in a fresh csi:
(use eopl)
(use syntax-case define-datatype)
(use run-3-5)
,t (run-all)       ; 0.045 seconds

There's a lot of redundancy here because of the use of run-time
macros, I'm just trying to bang this out for illustrative purposes.
Undoubtedly it could be done much nicer.

On 4/21/07, Ulrich Vollert <address@hidden> wrote:
Secondly, I was surprised about a performance comparison between chicken
and scheme48 when trying out the above commands on my desktop:

(run-all) needs 3.187 seconds in csi, but only 0.28 seconds in scheme48
- which is a factor of 11.




reply via email to

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