[plt-scheme] Performance Targets for MzScheme

From: Brent Fulgham (bfulg at pacbell.net)
Date: Wed May 12 18:06:23 EDT 2004

At one time we had some performance statistics that
showed MzScheme was pretty fast compared to other
Scheme implementations.  This was done pre 200-series,
so things have almost certainly changed.

For fun, I started playing with some existing
benchmarks found on the internet to see how MzScheme
stacks up to other similar systems.

The first test I ported does not show MzScheme to be a
great performer.  In this test, the idea is to read in
a fairly large file (15 Megs) and split each line into
tokens (by spaces):

(require (lib "13.ss" "srfi")
         (lib "42.ss" "srfi"))

(define (file-line-split-test)
  (let ((fp (open-input-file "testfile.dat")))
     (:port line fp read-line)
     ;Split the line up
     (string-tokenize line))))

> (load "all_test.scm")
> (time (file-line-split-test))
cpu time: 39607 real time: 40209 gc time: 7025

def file_line_split_test(NESTED):
  fp = open("testfile.dat")
  for a_line in fp.readlines():
    line_parts = string.split(a_line)

file_line_split_test(1) elapsed: 1.78199982643 seconds

sub file_line_split_test {
    my ($INDEX) = @_;
    my $line;

    while (<FILE>) {
	@line_parts = split(" ");

file_line_split_test elapsed 2.42350912094116

Thus, the gauntlet has been thrown.  How can we drop
our speed by an order of magnitude to compete with
these other scripting languages?!?  :-)


Posted on the users mailing list.