On Fri 22/05/09 10:51 AM , John Lato jwl...@gmail.com sent: > Hi Mario, > > It looks like the parallelize function is getting inlined when it's in > the same file, but not when it's in a separate file. > > Adding a {-# INLINE parallelize #-} pragma to the module with > parallelize recovers all the performance for me. > > You could probably see exactly what's happening in more detail by > going through the Core output.
Thank you, this advice helped. The Core output indicates that function `test' evaluates the arguments to `parallelize' before it calls it. In other words, the call to `parallelize' is optimized as a strict function call -- which it is. The problem is that this optimization evaluates the arguments sequentially. Compiling with optimizations turned off regains the parallel execution. I guess I will report this as a GHC bug. Or is it a feature request? _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe