Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!sdd.hp.com!news.cs.indiana.edu!dyb@marilyn.cs.indiana.edu From: dyb@marilyn.cs.indiana.edu (R. Kent Dybvig) Newsgroups: comp.lang.scheme Subject: Re: Benchmarking Scheme Message-ID: <1991May15.152039.1288@news.cs.indiana.edu> Date: 15 May 91 20:20:24 GMT References: Distribution: comp.lang.scheme Organization: Computer Science, Indiana University Lines: 36 wa@raven.cad.mcc.com (Wayne Allen) writes: >I've heard good things about Chez Scheme, and find it hard to >take Huntley's data on face value. Okay. I had decided to stay out of this thread, since I thought that Bill Rozas covered the subject sufficiently. Huntley's numbers are probably entirely correct for Chez Scheme Version 3.2 given the original program, which uses generic arithmetic. Furthermore, since Version 3.2 uses 19 bit fixnums, the original program will not run correctly with fixnum-specific operators. However, by playing around with the parameters (specifically, the "r" parameter), it is possible to use fixnum-specific operators and get much better performance: on the order of four or five times slower than C. Using Version 3.9n (a prerelease of Chez Scheme Version 4), which uses 30-bit fixnums, it is still not possible to run "(pi 800)" with the original program without causing fixnum overflow; the CMU Common Lisp numbers must be valid only because of the "unsigned" declaration. With a slight change to the "r" parameter to allow fixnum-specific operators to be used, Version 3.9n is slightly less than 3 times slower than optimized GNU C on a Sun-3. Although a factor of 3 is much more encouraging than a factor of 20, we clearly have more work to do to make this benchmark perform as well in Scheme as it does in C. Incidentally, there's a bug in the original C code: j is not initialized. I tried the C code first on a Sun 4 and it did not run properly until I initialized j to 0. Kent R. Kent Dybvig | Computer Science Department dyb@iuvax.cs.indiana.edu | Indiana University 812/855-6486 | Bloomington, IN 47405