[viff-devel] [issue75] Test without local computations
Martin Geisler
mg at daimi.au.dk
Sun Nov 30 14:44:52 PST 2008
Good evening,
I've been doing some more performance measurements. This time I replaced
the shamir.share and shamir.recombine functions with fake versions (see
revision f7d1f7cd3dda). The replacements do a zero-degree sharing:
>>> viff.shamir.share(17, 1, 3)
[(1, 17), (2, 17), (3, 17)]
>>> viff.shamir.recombine([(1, 17), (2, 17), (3, 17)])
17
They skip the normal machinery and do:
share = lambda s, t, n: [(s.field(i+1), s) for i in range(n)]
recombine = lambda s, x=0: s[0][1]
Enabling both fakes gives these timing results when doing 10000
multiplications on camel{10..12} on DAIMI (thyra02 is down so I used the
slightly slower camel machines):
+-------------------+----------+----------+------+
| Field size (bits) | Real (s) | Fake (s) | Diff |
+-------------------+----------+----------+------+
| 50 | 14.3 | 11.5 | 20% |
+-------------------+----------+----------+------+
| 100 | 14.4 | 11.4 | 21% |
+-------------------+----------+----------+------+
| 200 | 14.6 | 11.7 | 20% |
+-------------------+----------+----------+------+
| 400 | 15.0 | 11.9 | 21% |
+-------------------+----------+----------+------+
| 800 | 15.8 | 12.3 | 22% |
+-------------------+----------+----------+------+
| 1600 | 18.4 | 14.0 | 24% |
+-------------------+----------+----------+------+
I think that is quite a saving!
Feel free to suggest other functions that I should replace with a fake
version. Ah, the PRSS functions would of course be an easy target... I
guess I'll take a look at them tomorrow.
--
Martin Geisler
More information about the viff-devel
mailing list