
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?
Usually yes.
In a sense. I think it's important to remember that what matters is performance of a whole application, not of highly tuned benchmark code, and in writing applications with good performance, then the quality of profiling tools, and (especially) the amount of time the programmer has available for tuning, can be far more important than the compiler. There have certainly been occasions where Haskell entries to the ICFP programming contest have beat OCaml or even C/C++ entries on performance, by a wide margin. Likewise Ericsson's ATM switch, which is controlled by a million lines plus of Erlang (running on a byte code interpreter!), performs better than all its competitors. Benchmarks give a very one-sided view, ignoring the large effect that ease of programming can have on the final system's performance. John Hughes

John Hughes wrote:
Benchmarks give a very one-sided view, ignoring the large effect that ease of programming can have on the final system's performance.
Good point. Ease of programming helps you make /correct/ programs quicker, and some times allows you to use more advanced algorithms that you wouldn't dare try in C++. Cheers, Daniel.
participants (2)
-
Daniel Carrera
-
John Hughes