1
0
forked from GitHub/gf-core

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.
This commit is contained in:
hallgren
2011-09-01 16:39:41 +00:00
parent bfe4b0b2a4
commit 875df01dc6
4 changed files with 1012 additions and 494 deletions

View File

@@ -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