
31 Jan
2010
31 Jan
'10
11:28 a.m.
On Sun, Jan 31, 2010 at 11:14:36AM +0100, Markus Böhm wrote:
Variant 1: My lazy, idiomatic approach (as I understand it so far). It takes on my machine with eps = 0.00000001 approx. 25 sec.
Variant 2: My "C-style" approach achieving state via additonal function parameters. It takes on my machine with eps = 0.00000001 approx. 5 sec.
You could try the stream-fusion package on Hackage: http://hackage.haskell.org/package/stream-fusion It should give better performance on this kind of code since it can see the loops through the lists. Don't forget to compile with optimizations! :) HTH, -- Felipe.