|
![](/i/fill.gif) |
Slime wrote:
>> Er, no. Just tried it with the release version. The numbers are a fraction
>> of a second slower still. Either way, two equivilent formulations of the
>> program have wildly different runtimes.
>
> What's the difference between them?
One relies on automatic list fusion, the other is hand-fused. It turns
out GHC doesn't automatically fuse left folds. Since the entire program
is a left fold, I guess that'll be the problem then...
If my assumption that all list operations do get fused had been correct,
the two programs *would* be almost completely equivilent. (One with more
overloading than the other, possibly contributing to a few percent
overhead.)
This is what happens when you *assume* you know what you're talking
about; you get caught out.
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
![](/i/fill.gif) |