Hi my few, but loyal, VIFF'ers! I've just pushed a cool change: you can now do inline math using shares and it will automatically be turned into calls to the runtime.
So an old program would look like this: x, y, z = rt.shamir_share(Zp(20)) w = rt.mul(rt.mul(rt.add(x, 1), rt.sub(y, 1)), z) but a new program can look like this instead: x, y, z = rt.shamir_share(Zp(20)) w = (x+1) * (y-1) * z Very nice, isn't it? It simplified the Runtime internals somewhat as you can see in this changeset: http://hg.viff.dk/viff/rev/c4af12a6f6b3 Unfortunately this costs some performance :-( Right now, I think we loose about 50% because of the new layer of indirection. So the time to do a multiplication jumps from ~1 ms to ~1.4 ms, and a comparison jumps From ~550 ms to ~750 ms. These timings are from running three programs on my AMD 3800+ X2. I have not yet done timings over the DAIMI network. Loosing performance like this is what I don't like about Python... Since there is no compiler around to notice that the middle step can be skipped in x + y => x.__add__(y) => x.runtime.add(y) and so the Python runtime dutifully calls the __add__ method just to leave it again in the next line. If the compiler could inline calls, then a change like this ought to be free since it is completely eliminated at compile time. On the other hand, I really like how I feel more productive with Python than with any other programing language I have tried. If any of you know a good programming language that offers something similar to the Twisted network library (http://twistedmatrix.com/), then I would love to hear about it. Twisted is really the key piece that has made VIFF possible, so finding something similar would be a good first step if VIFF should be ported to another language. -- Martin Geisler
pgpllIuPetWqU.pgp
Description: PGP signature
_______________________________________________ viff-devel mailing list (http://viff.dk/) [email protected] http://lists.viff.dk/listinfo.cgi/viff-devel-viff.dk
