Hey guys,

in my stumbling over Reddit I happened to find the following comment http://www.reddit.com/r/programming/comments/248abo/range_comprehensions_c/ch56g7b, where the poster shows a simple algorithm which is really slow when implemented in Haskell, compared to a C++ counterpart which does it the same way.

I’ve tried to figure this out, but my profiling skills don’t seem to be good enough for this. I’m not sure if this is somehow a limitation of list comprehensions, or if something else is wrong.

-- 
Jakub