[commit: parallel] master: add NOINLINE pragmas to make RULEs more likely to fire (5331a63)
Simon Marlow
marlowsd at gmail.com
Tue Jul 31 11:02:33 CEST 2012
Repository : ssh://darcs.haskell.org//srv/darcs/packages/parallel
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/5331a63bca622486a2a04218ca702f22aa238956
>---------------------------------------------------------------
commit 5331a63bca622486a2a04218ca702f22aa238956
Author: Simon Marlow <marlowsd at gmail.com>
Date: Mon Jul 30 13:34:26 2012 +0100
add NOINLINE pragmas to make RULEs more likely to fire
>---------------------------------------------------------------
Control/Parallel/Strategies.hs | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/Control/Parallel/Strategies.hs b/Control/Parallel/Strategies.hs
index fa15111..9d2f3f2 100644
--- a/Control/Parallel/Strategies.hs
+++ b/Control/Parallel/Strategies.hs
@@ -506,6 +506,7 @@ parListWHNF xs = go xs `pseq` return xs
-- The non-compositional 'parListWHNF' might be more efficient than its
-- more compositional counterpart; use RULES to do the specialisation.
+{-# NOINLINE [1] parList #-}
{-# RULES
"parList/rseq" parList rseq = parListWHNF
#-}
@@ -573,6 +574,8 @@ parBuffer n strat = parBufferWHNF n . map (withStrategy strat)
-- Deforest the intermediate list in parBuffer/evalBuffer when it is
-- unnecessary:
+{-# NOINLINE [1] evalBuffer #-}
+{-# NOINLINE [1] parBuffer #-}
{-# RULES
"evalBuffer/rseq" forall n . evalBuffer n rseq = evalBufferWHNF n
"parBuffer/rseq" forall n . parBuffer n rseq = parBufferWHNF n
More information about the Cvs-libraries
mailing list