[plt-scheme] Fractals

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed Sep 20 09:57:48 EDT 2006

At Wed, 20 Sep 2006 21:32:34 +1000, "Ahmad Issa" wrote:
> Hi, I decided to make a (toy) fractals program. MzScheme (or PLT-Scheme in
> general) has a reasonable advantage in being able to handle complex numbers
> so well. However, I unfortunately could not get the code running fast
> enough. I understand Scheme's more of a scripting language and is probably
> not the best decision when it comes to number crushing, but i would
> appreciate any way to get this running faster!

I expect that the problem is boxed floating-point numbers. In
particular, MzScheme's JIT doesn't try to specialize and unbox
floating-point calculations.

In fact, if you look at the MzScheme vs. Java comparison in the
language-shootout site,


all of the bold negative numbers are floating-point benchmarks. (And
one of the benchmarks is Mandelbrot.)

Just to be clear, this is a PLT Scheme problem, not a Scheme problem.
Other Scheme compilers, such as Bigloo and Gambit, unbox floating-point
calculations and perform much better.


Posted on the users mailing list.