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

2008-07-17 Thread Janus Dam Nielsen
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. -- Janus Den 15/07/2008 kl. 16.49 skrev Martin Geisler: Janus Dam Nielsen [EMAIL PROTECTED] writes: Hi again, Heres the fruit of half a days work :)

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

2008-07-17 Thread Martin Geisler
Janus Dam Nielsen [EMAIL PROTECTED] 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

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

2008-07-17 Thread Janus Dam Nielsen
I have another thing to consider: the height of the resulting arithmetic circuit. Good idea. 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

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

2008-07-17 Thread Martin Geisler
Janus Dam Nielsen [EMAIL PROTECTED] writes: 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. This is more like an ordering

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

2008-07-15 Thread Martin Geisler
Janus Dam Nielsen [EMAIL PROTECTED] writes: Hi again, Heres the fruit of half a days work :) Analyzing the expression: sint n = (a * y + (1 - a) * x); Yields the following results: Final result: ((a * y )+ ((1 - a )* x )) cost: 30 (((a * y )+ x )- (x * a )) cost: 30 (((a * y )+ x