This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Two simple benchmarks of double-cells + new GC scheme


I've made two simple benchmarks testing performance and loading speed for

1. guile-oops.ogc    statically linked (> 1Mb binary) mdj_pre_doublecell
                     guile-oops (Guile + GOOPS)

2. guile-oops.dcogc  as 1 but CVS tag mdj_post_doublecell

3. guile-oops.dcngc  as 2 but __scm.h:GUILE_NEW_GC_SCHEME defined

The first benchmark is loading the file foo.scm:

(let loop ((i 500000.0) (sum 0.0))
  (if (>= i 0.0)
      (loop (- i 1.0) (+ sum 0.1))))

RESULTS: 18 s, 13 s, 10 s  => 3 is 80% faster than 1

The second benchmark is loading my GOOPS matrix package (math matrix).

RESULTS: 3.7 s, 4.6 s, 3.5 s (these results are somewhat unreliable)


CONCLUSION:

This indicates that we should

1. Keep the double cell change

2. Switch to using the new GC scheme

/mdj

Unedited transcript from session on my 333 MHz Pentium-II machine
running Debian Woody:

thalamus> time ./guile-oops.ogc -c '(load "foo.scm")'

real	0m18.479s
user	0m18.230s
sys	0m0.060s
thalamus> time ./guile-oops.ogc -c '(load "foo.scm")'

real	0m18.353s
user	0m18.120s
sys	0m0.040s
thalamus> time ./guile-oops.dcogc -c '(load "foo.scm")'

real	0m13.029s
user	0m12.860s
sys	0m0.030s
thalamus> time ./guile-oops.dcogc -c '(load "foo.scm")'

real	0m12.991s
user	0m12.830s
sys	0m0.020s
thalamus> time ./guile-oops.dcngc -c '(load "foo.scm")'

real	0m10.172s
user	0m10.020s
sys	0m0.040s
thalamus> time ./guile-oops.dcngc -c '(load "foo.scm")'

real	0m10.160s
user	0m10.030s
sys	0m0.020s

thalamus> time ./guile-oops.ogc -c '(use-modules (math matrix))'

real	0m3.707s
user	0m3.620s
sys	0m0.040s
thalamus> time ./guile-oops.ogc -c '(use-modules (math matrix))'

real	0m3.729s
user	0m3.650s
sys	0m0.030s
thalamus> time ./guile-oops.dcogc -c '(use-modules (math matrix))'

real	0m4.639s
user	0m4.580s
sys	0m0.010s
thalamus> time ./guile-oops.dcogc -c '(use-modules (math matrix))'

real	0m4.716s
user	0m4.610s
sys	0m0.050s
thalamus> time ./guile-oops.dcngc -c '(use-modules (math matrix))'

real	0m3.458s
user	0m3.390s
sys	0m0.020s
thalamus> time ./guile-oops.dcngc -c '(use-modules (math matrix))'

real	0m3.460s
user	0m3.390s
sys	0m0.030s

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]