On Mon, Mar 4, 2013 at 11:39 AM, Łukasz Dąbek <sznurek@gmail.com> wrote:
Thank you for your help! This solved my performance problem :)

Anyway, the second question remains. Why performance of single
threaded calculation is affected by RTS -N parameter. Is GHC doing
some parallelization behind the scenes?

I believe it's because -N makes GHC use the threaded RTS, which is different from the non-threaded RTS and has some overheads therefore.