[Haskell-cafe] Speed comparison?

Daniel Carrera dcarrera at digitaldistribution.com
Tue May 3 12:20:45 EDT 2005


Hi all,

Thank you for all the information on my previous question. I learned a 
lot, and good pointers to more info.

My next question is about speed. How fast would you consider Haskell? 
(say, for computational work). How would you compare it to C, Python and 
Ruby?

I suggest C, Python and Ruby as a basis of comparison because:

1) C is what I'd use if I wanted something fast.
2) Python or Ruby is what I'd use if I wanted clean code.

I know that Haskell can be compiled, thanks to ghc. Ruby is interpreted 
and I'm pretty sure Python is quasi-interpreted (it's "compiled" on the 
fly to Java-style bytecode and a VM runs the bytecode). Furthermore, the 
Haskell page says that ghc produces fast programs. So I would guess that 
Haskell is faster than Python, but not as fast as C.

Would that be correct? For computational work (e.g. a simulation, 
factoring primes, whatever) does it approach C speed?

I would be happy to hear a comparison with any other language you find 
interesting.:-) As well as any other information you'd like to share.

Cheers,
Daniel.


More information about the Haskell-Cafe mailing list