Re: [Haskell-cafe] OCaml list sees abysmal Language Shootout results]

30 Sep
2004
30 Sep
'04
3:06 p.m.
Sam Mason wrote:
You probably want some strictness annotations in there. . .
Now we're getting somewhere. When I replace the tuples with my own
(strict) data structure, it gets about 7.5 times faster than the original
shootout example (or about 24 times faster than the version with
tuples). I get another 2x speedup when I pass '+RTS -G1' to the
executable. So the version below is about 15 times faster than the
original using the 3MB data file from the shootout. (Now we're only
about 40x slower than ocaml). Don't forget to turn on '-funbox-strict-fields'
for an additional improvement.
-- Compile with...
-- ghc -O2 -ddump-simpl -fvia-c -funbox-strict-fields -o wc_fold2 wc_fold2.hs
-- execute as... ./wc_fold2 +RTS -G1
7584
Age (days ago)
7584
Last active (days ago)
0 comments
1 participants
participants (1)
-
Greg Buchholz