[Haskell-cafe] library on common sub-expression elimination?
emax at chalmers.se
Mon Aug 15 11:31:22 CEST 2011
2011-08-13 05:40, Levent Erkok skrev:
> On 8/12/2011 10:30 AM, Conal Elliott wrote:
>> Note that data-reify will only find *some* common/equal sub-expressions,
>> namely the pointer-equal ones. In all of my code-generating ("deep")
>> DSLs, it's been very important for efficiency to also pull out
>> equal-but-pointer-unequal expressions.
>> - Conal
> data-reify-cse (http://hackage.haskell.org/package/data-reify-cse) by
> Sebastiaan Visser performs cse for graphs generated by Andy's data-reify.
I just wanted to point out that syntactic
also has the functionality provided by data-reify and data-reify-cse.
See Examples/NanoFeldspar/Test.hs for a demonstration. The reification
part is more or less copied from data-reify, so it's conceptually doing
the same thing.
When it comes to graph reification, syntactic doesn't really offer
anything more than what data-reify(-cse) does. But in the future,
syntactic will also rebuild an expression with let binding from the graph.
More information about the Haskell-Cafe