[Haskell-cafe] JuicyFruit - explanation of speed difference of pure and monadic image generation

Alp Mestanogullari alpmestan at gmail.com
Thu Mar 20 14:43:17 UTC 2014

Could it be because you are calling withImage in IO whereas generateImage
coes through ST? A lot of the nice performance numbers of JuicyPixels come
from its carefully tailored ST usage, which in turn comes from
theefficiency of unboxed mutable vectors (as in the "vector" package).

So could you post the benchmark result for a version where you runST on the
result of withImage? That should be a fairer comparison. Also, writing a
criterion benchmark would help and make sure the functions are run properly
without any of the two taking advantage of computations previsouly
performed by the other.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140320/298a89cc/attachment.html>

More information about the Haskell-Cafe mailing list