[Haskell-cafe] Re: computing lists of pairs

Christian Maeder Christian.Maeder at dfki.de
Wed Dec 2 12:54:51 EST 2009


Daniel Fischer schrieb:
> However, according to a couple of tests, the "funkyName" version is somewhat faster and 
> allocates less.

My timing tests showed that your fpairs version is fastest.
(first argument "True" selects filteredPairs, "False" funkyName)

My initial version "myf" is almost unusable.

C.

(code attached)

maeder at leibniz:~/haskell/examples> ghc --make -O2 FilteredPairs.hs
[1 of 1] Compiling Main             ( FilteredPairs.hs, FilteredPairs.o )
Linking FilteredPairs ...
maeder at leibniz:~/haskell/examples> time ./FilteredPairs True EQ 5000
5000

real    0m0.567s
user    0m0.536s
sys     0m0.020s
maeder at leibniz:~/haskell/examples> time ./FilteredPairs False EQ 5000
5000

real    0m0.819s
user    0m0.796s
sys     0m0.012s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FilteredPairs.hs
Type: text/x-haskell
Size: 1086 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20091202/a7f58e9a/FilteredPairs.bin


More information about the Haskell-Cafe mailing list