[plt-scheme] DrScheme Faster on Powerset than MzScheme - Why?

From: Kyle Smith (airfoil at bellsouth.net)
Date: Thu Mar 15 19:18:47 EDT 2007

I was actually benchmarking DrScheme against another flavor of Scheme, 
and I thought the results were unfair, since DrScheme is also an IDE.  
So I compiled to .zo (which didn't alter the times appreciably) and ran 
this little powerset routine in DrScheme and MzScheme with the following 
results.
-------------- THE CODE --------------
(module powerset mzscheme
  (provide go)
(define (power-set s)
  (if (null? s)
      (list '())
      (let ((rest (power-set (cdr s))))
        (append (map (lambda(x) (cons (car s) x)) rest) rest))))
(define (go)
  (collect-garbage)
  (time
   (let ([ps (power-set '(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 
19 20))])
     'powerset)))
  )
-------------- THE RESULTS ------------
Welcome to DrScheme, version 369.8-svn2mar2007 [3m].
Language: Textual (MzScheme, includes R5RS).
 > (require powerset)
 > (go)
cpu time: 469 real time: 468 gc time: 265
powerset
 > (go)
cpu time: 469 real time: 469 gc time: 266
powerset
-----------------------------------------------------------------------------------
C:\Documents and Settings\kyle\My Documents\Scheme\math>mzscheme -q 
--require powerset.scm
Welcome to MzScheme v369.8 [3m], Copyright (c) 2004-2007 PLT Scheme Inc.
 > (go)
cpu time: 563 real time: 563 gc time: 405
powerset
 > (go)
cpu time: 563 real time: 563 gc time: 376
powerset
 > (exit)
-----------------------------------------------------------------------------------
I was really surprised that DrScheme beat out MzScheme.   Do I have 
something setup wrong on the command line of MzScheme, as I don't often 
use the stand-alone interpreter, so I could be missing something?

--kyle

Kyle Smith
airfoil at bellsouth dot net
schemekeys.blogspot.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20070315/d24b7bb2/attachment.html>

Posted on the users mailing list.