Tuesday, January 25, 2011

STALIN is awesome

Stalin, the Scheme compiler (not the ruthless dictator) is provably awesome. By comparing the performance of macro-primes (code generated by cps-macro-conv) on primes with interpreters (SCM, MzScheme/Racket, MIT-Scheme and Petite), and with Alexpander compiled by Bigloo and Stalin: it comes second after Petite!

Noting that Petite has a very well integrated and optimized expander, while Alexpander being the most general/portable one. So this is a very good result.
Also note that macro-computation, having a normal-order, head-first term-rewriting system at its core is in fact very close to a Turing machine.

Computing (is-prime 7) at compile-time (on an old 1.7Ghz laptop with 2G memory) gave the following (very rough results):
  • Petite (7.4d): 1.4s
  • Alexpander/Stalin (0.11): 4.8s
  • Alexpander/Bigloo (3.6a): 8.5s
  • Chicken interpreter (4.2.0): 11s
  • SCM (5e5): 15s
  • Racket (v5.0.1): 39s
  • Ypsilon (0.9.6-update3): 47s (fails on larger primes)
  • Larceny (0.97):  54s
  • Plt/MzScheme: (v4.2.1) 110-121s
  • Mosh (0.2.6):  crash after XXX minutes
  • MIT-Scheme: crash after XXX minutes
  • Scheme48 (1.8):  crash after XXX minutes
  • Scsh (0.6.7): FAILED
  • Gauche: FAILED
  • Gambit: FAILED
  • Ikarus: FAILED

Monday, January 24, 2011

Reviving my research blog

It's been awhile, my old ASP.NET-based blog is getting stale and out-of-date. Having no passion to keep maintaining it, lets see how this new one works out...