On Sat, 26 Aug 2006 21:31:16 -0400 Marc Feeley feeley@iro.umontreal.ca wrote:
Désolé j'ai oublié de te mettre en CC.
Marc
Begin forwarded message:
From: Marc Feeley feeley@iro.umontreal.ca Date: August 26, 2006 9:28:15 PM EDT (CA) To: Gambit List Gambit-list@iro.umontreal.ca Cc: Eli Barzilay eli@barzilay.org, Matthew Flatt mflatt@cs.utah.edu Subject: Gambit-C vs. Bigloo vs. MzScheme
After I saw Eli Barzilay's post to comp.lang.scheme about the performance of MzScheme compared to other Scheme systems (http:// groups.google.com/group/comp.lang.scheme/msg/473f91e7065b6f73? dmode=source) I was tempted to do some benchmarking of my own using the Gambit Scheme benchmark suite which goes beyond the classical Gabriel benchmarks (it has close to 60 Scheme benchmarks). Most benchmarks are straightforward R4RS code and so should work on just about any Scheme system.
I have updated the benchmarking infrastructure to accomodate other Scheme systems, and MzScheme and Bigloo in particular. I also wrote a script to run all benchmarks and automatically generate an HTML table of the results. The table can be viewed here:
http://www.iro.umontreal.ca/~gambit/bench.html
And the benchmark suite is available here:
http://www.iro.umontreal.ca/~gambit/bench.tar.gz
As you can see from the table, Gambit-C is faster than Bigloo and MzScheme on roughly 3 out of 4 benchmarks. I have used the same assumptions as Eli, which approximate the semantics of R6RS (see the last section of the result page for details).
It would be really interesting to extend this experiment to other Scheme systems. It should not be too difficult to modify the benchmarking scripts to test other systems. The hardest parts are installing the Scheme system, figuring out which compiler options are equivalent to the ones used by the other systems (i.e. approximate R6RS semantics), and work out unexpected problems.
The following systems are particularly interesting to compare to:
- Chicken
- Scheme 48
- Larceny
- Chez Scheme
Are there any volunteers?
Marc
Hello Marc,
Ah, benchmarking... Definitely we can't escape benchmarks :-). I had more or less sweared not to benchmark any more because this is an activity that can consume all your time and for which the result is not necessarily very useful. However, because I didn't want to spend a bad Sunday :-) I have downloaded your benchmarks and make some measurements with Bigloo. Here is what I got:
-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|----- General command line: bigloo -O6
OFP=-copt -fomit-frame-pointer fixnum= /+/+fx/, /-/-fx/, ... unsafe=bigloo -O6 -unsafe FLOAT= re-implementing FLOAT+, FLOAT-, ...
====================================================================== tak1:
Marc's time: real: 11.22s sys: 0.02s user: 11.13s fixnum: real: 3.61s sys: 0.01s user: 3.57s fixnum, omit-frame-pointer: real: 2.80s sys: 0.01s user: 2.78s
====================================================================== fft:
Marc's time: real: 11.71s sys: 0.03s user: 11.32s FLOAT fixed: real: 4.39s sys: 0.02s user: 4.10s FLOAT fixed, unsafe real: 3.44s sys: 0.01s user: 3.33s FLOAT fixed, unsafe, $OFP real: 3.02s sys: 0.01s user: 2.92s
====================================================================== pnpoly:
Marc's time: real: 16.39s sys: 0.02s user: 15.79s FLOAT: real: 15.81s sys: 0.02s user: 14.50s FLOAT, unsafe: real: 1.86s sys: 0.01s user: 1.82s FLOAT, unsafe, $OFP: real: 1.49s sys: 0.00s user: 1.47s
====================================================================== sum:
Marc's time: real: 5.44s sys: 0.01s user: 5.36s FLOAT, unsafe, $OFP: real: 5.29s sys: 0.01s user: 5.22s FIXNUM, unsafe, $OFP: real: 0.29s sys: 0.00s user: 0.27s
====================================================================== sumfp:
Marc's time: real: 9.76s sys: 0.01s user: 9.57s FLOAT: real: 0.55s sys: 0.01s user: 0.52s FLOAT, unsafe, $OFP: real: 0.54s sys: 0.00s user: 0.52s -----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----
As you can notice, changing the compilation options and improving your prefix-bigloo.scm file has a huge impact. As you can notice some benchmarks now go 18 times faster!
Here is a description of the modiication I have applied:
1- I have re-implemented your macros FLOATxxx that were badling implemented for Bigloo. They used to expanse into call to the generic functions. They now expanse to the floating point operator. The improvement for benchmark using floating applications is in between 2 and 5 times faster.
2- I have used the proper benchmarking compilation options. a- The produced C code must be compiled with -fomit-frame-pointer (when using GCC). b- The option -unsafe has to be used.
3- For fixnum benchmarks, I have replaced the call to the generic functions with calls to fixnum functions.
Please, find enclosed the new version of prefix-bigloo.scm. I would appreciate if you could re-execute the Bigloo benchmarks with the new prefix and update your web pages with the new Bigloo results. Thanks in advance.