[Haskell-cafe] Re: Haskell Speed

Daniel Carrera daniel.carrera at zmsl.com
Fri Dec 23 16:15:44 EST 2005


Peter Simons wrote:
> How do you measure the time it takes to come up with a
> QuickSort algorithm that, implemented in Haskell, crushes
> the MergeSort algorithm all other languages use? ;-)

:-)

I've been impressed with Haskell so far. Today I implemented a reverse 
Polish notation calculator. The code is 55 lines, it's easy to read, and 
only took a few hours for this humble newbie to implement.

The second function I wrote in Haskell was quicksort :)

But still... I think that speed benchmarks can be useful. For example, I 
really like Ruby, but its speed would really stop me from using it for 
many applications even though it's a very expressive language. So it's 
good to know what speed limitations the language has.

Right now I'd say that if I need a complex algorithm (e.g. an RPN 
calculator) I'd do it in Haskell, but when I have a simple algorithm and 
performance is an issue (e.g. modeling the colission of two galaxies) 
I'd use C.

Cheers,
Daniel.
-- 
      /\/`) http://oooauthors.org
     /\/_/  http://opendocumentfellowship.org
    /\/_/
    \/_/    I am not over-weight, I am under-tall.
    /


More information about the Haskell-Cafe mailing list