[viff-devel] Vedr.: Small VIFF language parser

Martin Geisler mg at daimi.au.dk
Thu Jul 17 05:08:09 PDT 2008


Janus Dam Nielsen <jdn at brics.dk> writes:

> If there are any other ideas for optimizations you would like to see
> in a compiler for VIFF then now is the time to come forward.

I have another thing to consider: the height of the resulting
arithmetic circuit.

If there are several possibilities for expressing the formula and each
has the same number of multiplications, then one should go for the one
with the least height: so (a*b) * (c*d) instead of ((a*b) * c) * d.

You might even want to prefer a formula with more multiplications if
it lowers the height of the tree -- but I cannot come up with a good
example of such a situation :-)

-- 
Martin Geisler


More information about the viff-devel mailing list