From 875df01dc6427afab39131672a9d7ce62059b828 Mon Sep 17 00:00:00 2001 From: hallgren Date: Thu, 1 Sep 2011 16:39:41 +0000 Subject: Add lazy version of GF.Compile.Compute.Concrete This patch adds GF.Compile.Compute.ConcreteLazy, which replaces the Err monad with the Identity monad. While the Err monad makes the interpreter (hyper)strict, the Identity monad let's the interpreter inherit Haskell's laziness. This can give big speedups: from 50s to 1s in one example, from ~4 minutes to ~2 minutes for the RGL. This is still experimental and might be buggy, so it is off by default. You can turn it on by configuring with the -fcclazy flag, e.g. cabal configure -fcclazy Let me know if anything breaks. --- gf.cabal | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gf.cabal') diff --git a/gf.cabal b/gf.cabal index 71a43854b..50831fc74 100644 --- a/gf.cabal +++ b/gf.cabal @@ -23,6 +23,10 @@ flag server Description: Include --server mode Default: True +flag cclazy + Description: Switch to lazy compute_concrete (new, experimental) + Default: False + library build-depends: base >= 4.2 && <5, array, @@ -181,3 +185,6 @@ executable gf other-modules: GF.System.UseSignal else other-modules: GF.System.NoSignal + + if flag(cclazy) + cpp-options: -DCC_LAZY -- cgit v1.2.3