[Haskell-cafe] Re: Importing Data.Char speeds up ghc around 70%
Joost Behrends
webmaster at h-labahn.de
Sat Dec 22 17:19:00 EST 2007
Sterling Clover <s.clover <at> gmail.com> writes:
> I'm curious if you get the same performance difference importing GHC.List
instead of Data.Char? I chased some dependencies, and Data.Char imports GHC.Arr,
which in turn imports GHC.List, which provides a bunch of fusion rules pragmas
that would probably optimize your (++) usage. If this is the case, not sure if
its a bug or not, but all this will have to be thought through as more stream
fusion is rolled out anyway, I suspect?
>
>
Yes - the same difference: 1.33 minutes vs. 2.30 now.
I was near at reporting this as a bug, but rejected that idea. What does "bug"
mean here ? I am really a rookie at Haskell - this working on primefactors
is nothing but an excercise (however i casually try number theoretic
problems and often missed a program like this). But - as it appears to me -
the dramatic advance in speed ghc has made recently is to a great extent
due to improved types and their methods. What i see at
haskell.org/ghc/docs/latest/html/libraries looks like huge road works to me.
And then it is not a "bug", if elder libraries as the Prelude perhaps are not
completely up to date.
Another problem is, that my program was not completely correct. But it didn't
crash and got most numbers decomposed correct. But the strange
behavior disappeared with a correct version.
Perhaps the Prelude will get better now.
Cheers, Joost
More information about the Haskell-Cafe
mailing list