[Haskell-cafe] performance question

Bob Ippolito bob at redivi.com
Fri Feb 8 21:45:16 CET 2013


Do you mind posting createMatrixDump.py and printMatrixDecay.py? That would
certainly make it easier to help you.


On Fri, Feb 8, 2013 at 11:26 AM, Nicolas Bock <nicolasbock at gmail.com> wrote:

> Hi list,
>
> I wrote a script that reads matrix elements from standard input, parses
> the input using a regular expression, and then bins the matrix elements by
> magnitude. I wrote the same script in python (just to be sure :) ) and find
> that the python version vastly outperforms the Haskell script.
>
> To be concrete:
>
> $ time ./createMatrixDump.py -N 128 | ./printMatrixDecay
> real    0m2.655s
> user    0m2.677s
> sys     0m0.095s
>
> $ time ./createMatrixDump.py -N 128 | ./printMatrixDecay.py -
> real    0m0.445s
> user    0m0.615s
> sys     0m0.032s
>
> The Haskell script was compiled with "ghc --make printMatrixDecay.hs".
>
> Could you have a look at the script and give me some pointers as to where
> I could improve it, both in terms of performance and also generally, as I
> am very new to Haskell.
>
> Thanks already,
>
> nick
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130208/e66dae85/attachment.htm>


More information about the Haskell-Cafe mailing list