Jan Brosius <[EMAIL PROTECTED]> writes on 16 Mar 2000
on speed and size of compiled Haskell code
> [..]
> E.g. if one uses GHC to compile Haskell code into native code what
> speed performance can be expected versus a same program written in
> C [..]
My experience with the program of generating permutations on
[1..10]
showed that the code produced by ghc-4.04 is 22 times slower than
certain specially written C program.
Only the C program algorithm was taken very different from Haskell's
one. For each system has its own best algorithm and appropriate data
structure.
But this example task was chosen as unlucky for Haskell.
In other, average case, I expect the ratio of 6-10.
But I am not so sure.
It is easy to mistake with such comparison.
> Is lazyness as good as strictness.
It helps to write simpler programs, but brings certain average cost
overhead.
The average practical cost difference does not seem great, and it
looks like it is a matter of taste, what to choose.
------------------
Sergey Mechveliani
[EMAIL PROTECTED]