[Haskell-cafe] Can Haskell outperform C++?

Dmitry Vyal akamaus at gmail.com
Mon May 14 10:03:23 CEST 2012


On 05/11/2012 07:53 AM, Ertugrul Söylemez wrote:
> My point is: If you need C-like performance at a certain spot there is 
> really no excuse for writing the entire application in C. Haskell has 
> a working, powerful enough FFI. Also idiomatic Haskell code nowadays 
> performs close to C. If your code doesn't, chances are that it's not 
> even idiomatic. Sorting a list is easy and beautiful in code. But it's 
> far from idiomatic. Using ST with destructive update is also not 
> idiomatic. One of my performance masterpieces is the "instinct" AI 
> library (see Hackage). It uses only immutable vectors and performs 
> very heavy Double calculations, yet performs better than the same code 
> with mutable arrays did. With a few years of Haskell experience in my 
> backpack I know how to utilize laziness to get amazing performance for 
> code that most people would feel must be written with destructively 
> updating loop. And the resulting code is just beautiful to read and 
> watch at work, a great demonstration of the wonders the GHC developers 
> have created.
Hello Ertugrul,

Out of the curios, did you compare the performance of Instinct with 
implementations in languages, associated with numerical computations, 
like Octave?



More information about the Haskell-Cafe mailing list