[Haskell-cafe] newbie questions (read, etc., with Data.ByteString.Lazy.Char8)

wman 666wman at gmail.com
Tue Oct 7 00:44:48 EDT 2008

 ghc -Onot -fstrictness --make Main1.hs && ghc -Onot -fstrictness --make
Main2.hs && ghc -Onot -fstrictness --make Main3.hs

time Main1 < nums
real    0m39.530s
user    0m0.015s
sys     0m0.030s

time Main2 < nums
real    0m14.078s
user    0m0.015s
sys     0m0.015s

time Main3.exe < nums
real    0m41.342s
user    0m0.015s
sys     0m0.015s

still, i'm going to google up strictness analysis to at least know what made
no difference in this case ;-)

btw, why is the example #2 (
(which kicks collective asses of all other participants) not considered in
the shootout ? Too much optimizations ?

On Tue, Oct 7, 2008 at 6:27 AM, Don Stewart <dons at galois.com> wrote:

> 666wman:
> >    just for the kicks i tried the new version of bytestring without -O2
> and
> >    the results were even worse:
> Note that without -O or -O2 no strictness analysis is performed. So that
> tail recursive loop ... won't be. You could try -Onot -fstrictness just
> for kicks, to see why strictness analysis is important when writing in a
> tail recursive style.
> -- Don
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20081007/cca99c9f/attachment.htm

More information about the Haskell-Cafe mailing list