Jan's questions I don't think have a simple answer. My own belief is that
with sufficient development effort, one can always write a C program that is
more efficient than compiled Haskell code. However, the same thing also
applies to assembly language. The question, imho, is what are the typical
efficiency-vs-development-effort curves for C and haskell. I think problems
that are conceptually simple, but require large volumes of similar data, may
surpass haskell at all levels of development effort. My own experience
suggests that for problems which require more intelligence and less sheer
volume of data, a haskell solution can require an order of magnitude less
development effort. I think the folks working with Frob and Fran would say
something similar. Only when the development effort is exceedingly high, in
these cases, would C be more efficient. However, even in those cases, the
following steps might provide the best results.
1) Code in Haskell
2) Search for optimizations in Haskell
3) Search for bottlenecks that could be reduced by re-writing some part
of the code in C
4) If efficiency requirements are still not met, use the above code as a
prototype and recode in C
I hope this gives you a place to start.
> -----Original Message-----
> From: Jan Brosius [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 16, 2000 8:04 AM
> To: [EMAIL PROTECTED]
> Subject: speed and size of compiled Haskell code
>
>
> Hi,
>
> I wonder if someone could tell me more about the 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 (Hints about
> the nhc compiler are welcome).
> Is lazyness as good as strictness.
> What about Haskell 98 versus (I anticipate) Haskell 2
>
> Thanks
>
> Jan Brosius
>
>