a faster, accumulating mapM (was Re: [Haskell-cafe] mapM vs mapM_ performance)

Bulat Ziganshin bulat.ziganshin at gmail.com
Thu Apr 24 17:33:50 EDT 2008


Hello Niklas,

Friday, April 25, 2008, 1:25:39 AM, you wrote:

> Not that it should matter for performance any, but you really ought to
> reverse the result list too, or compute the accumulator in the right
> order. :-)

unfortunately, this affects performance too. reverse costs one more scan
through the list and building lot of thunks has its own space and time
cost


-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list