Hi David,

thank you! This is really useful information!

> I think it's the let floating (out) together with common subexpression 
> elimination:
> 
>  > ghc --make -O2 -no-recomp -fno-cse  -o curry-no-cse  curry.hs
> [1 of 1] Compiling Main             ( curry.hs, curry.o )
> Linking curry-no-cse ...
>  > ghc --make -O2 -no-recomp -fno-full-laziness  -o curry-no-fll  curry.hs
> [1 of 1] Compiling Main             ( curry.hs, curry.o )
> Linking curry-no-fll ...
>  > ghc --make -O2 -no-recomp -fno-full-laziness -fno-cse  -o 
> curry-no-cse-no-fll  curry.hs
> [1 of 1] Compiling Main             ( curry.hs, curry.o )
> Linking curry-no-cse-no-fll ...
>  > ./curry-no-cse
> 3 possibilities: [True,False]
> 2 possibilities: [True,False]
>  > ./curry-no-fll
> 3 possibilities: [True,False]
> 2 possibilities: [True,False]
>  > ./curry-no-cse-no-fll
> 3 possibilities: [True,True,False]
> 2 possibilities: [True,False]

I will try this on large scale Curry programs. I hope the remaining
optimizations will still do some good. Do you think that there is a way
to be more selective? I mean to select those parts of the program which
can and which cannot be optimized?

> ps.: Maybe it is interesting to look at HasFuse [1] (somewhat outdated), 
> but it exactly forbids both transformations
> 
> [1] http://www.ki.informatik.uni-frankfurt.de/research/diamond/hasfuse/

Yes, that looks interesting, too. Are there plans to update it with the
ghc?

Thanks for your hints!
Bernd
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to