[Haskell-cafe] Can Haskell outperform C++?
igouy2 at yahoo.com
Wed May 23 22:26:47 CEST 2012
> From: wren ng thornton <wren at freegeek.org>
> Sent: Tuesday, May 22, 2012 9:30 PM
> FWIW, that matches my expectations pretty well. Naive/standard Java performing
> slower than Smalltalk; highly tweaked Java using non-standard data types
> performing on-par with or somewhat faster than Smalltalk.
I have no difficulty believing that if you are talking about a 1996 Java reference implementation and a 1996 Smalltalk JIT VM.
I could believe that if you are comparing a naive Java program with a highly tweaked Smalltalk program.
> That C is 7x faster is a bit on the high end, but for something like tsort I could imagine it'd be possible.
It's possible because it's possible to write a Java program to be slower than it need be :-)
> Do bear in mind that Java doesn't optimize ---that's the JIT's job
What are we supposed to make of that?
Why write that and not -- Do bear in mind that Smalltalk doesn't optimize that's the JIT's job -- or -- Do bear in mind that C doesn't optimize that's the compiler's job.
> But even still, in my experience of using Smalltalk, the standard data
> structures are much better done and so they will be on-par with what you'd
> get from hand-tuning for Java. I've spent a lot of time trying to get decent
> performance out of Java, not so much with Smalltalk; but the performance with
> Smalltalk was sufficient that it wasn't needed so badly.
Do you have a specific example that you can share?
More information about the Haskell-Cafe