<div dir="ltr">Hi list,<div><br></div><div style>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.</div>

<div style><br></div><div style>To be concrete:</div><div style><div><br></div><div>$ time ./createMatrixDump.py -N 128 | ./printMatrixDecay</div><div>real    0m2.655s<br></div><div>user    0m2.677s</div><div>sys     0m0.095s</div>

<div><br></div><div>$ time ./createMatrixDump.py -N 128 | ./printMatrixDecay.py -<br></div><div><div>real    0m0.445s</div><div>user    0m0.615s</div><div>sys     0m0.032s</div></div><div><br></div><div style>The Haskell script was compiled with &quot;ghc --make printMatrixDecay.hs&quot;.</div>

</div><div style><br></div><div style>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.</div><div style>

<br></div><div style>Thanks already,</div><div style><br></div><div style>nick</div><div style><br></div></div>