[Haskell-cafe] Re: Write Haskell as fast as C. [Was: Re: GHC
predictability]
Bryan O'Sullivan
bos at serpentine.com
Fri May 16 15:06:32 EDT 2008
Andrew Coppin wrote:
> On the other hand, this is the anti-theisis of Haskell. We start with a
> high-level, declarative program, which performs horribly, and end up
> with a manually hand-optimised blob that's much harder to read but goes
> way faster.
Buh? This is hard to read?
mean n m = go 0 0 n
where go s l x | x > m = (s::Double) / fromIntegral (l::Int)
| otherwise = go (s+x) (l+1) (x+1)
One can in fact imagine a world in which the compiler does this
transformation for you, though it takes a bit of squinting.
http://reddit.com/r/programming/info/6jjhg/comments/c040ybt
<b
More information about the Haskell-Cafe
mailing list