Martin Geisler <[EMAIL PROTECTED]> writes:
> I'm thinking that there might be some unfortunate overhead in the
> preprocessing book-keeping. We should try running benchmark.py under
> a profiler to see where the time is spent.
There is now support for a --profile flag, and running benchmark.py
with it gives (1000 actively secure multiplications, 4 players):
2706417 function calls (2113774 primitive calls) in 37.755 CPU seconds
Ordered by: internal time, call count
List reduced from 301 to 40 due to restriction <40>
ncalls tottime percall cumtime percall filename:lineno(function)
58 6.642 0.115 34.640 0.597 selectreactor.py:82(doSelect)
230033/17014 6.011 0.000 29.850 0.002 defer.py:306(_runCallbacks)
305044/249023 3.099 0.000 9.937 0.000 defer.py:168(addCallbacks)
35000 1.637 0.000 8.042 0.000 runtime.py:1088(mul)
46504 1.338 0.000 4.218 0.000 runtime.py:184(__init__)
105115 1.310 0.000 1.780 0.000 field.py:371(__mul__)
188307 1.269 0.000 1.269 0.000 field.py:339(__init__)
2000 1.053 0.001 12.017 0.006 matrix.py:128(__mul__)
117027/21014 0.992 0.000 27.129 0.001
defer.py:283(_startRunCallbacks)
72000 0.848 0.000 1.486 0.000 field.py:342(__add__)
192023/158017 0.820 0.000 8.283 0.000 defer.py:185(addCallback)
117027/21014 0.807 0.000 27.282 0.001 defer.py:229(callback)
37000 0.799 0.000 2.382 0.000 runtime.py:137(clone)
115512 0.762 0.000 1.368 0.000 runtime.py:70(__init__)
15006 0.603 0.000 0.603 0.000 runtime.py:574(_expect_data)
102008/67006 0.525 0.000 8.953 0.000
runtime.py:208(_callback_fired)
48003/6003 0.518 0.000 21.195 0.004 runtime.py:353(inc_pc_wrapper)
36000 0.514 0.000 6.201 0.000 runtime.py:742(add)
9000 0.494 0.000 1.285 0.000 shamir.py:95(recombine)
43504 0.373 0.000 5.085 0.000 runtime.py:216(gather_shares)
19006 0.340 0.000 1.051 0.000 runtime.py:306(sendData)
70 0.336 0.005 27.819 0.397 basic.py:345(dataReceived)
15009 0.328 0.000 27.483 0.002 runtime.py:267(stringReceived)
117026 0.287 0.000 0.287 0.000 defer.py:162(__init__)
19009 0.272 0.000 0.517 0.000 abstract.py:164(write)
6000 0.263 0.000 0.455 0.000 matrix.py:201(transpose)
3000 0.249 0.000 2.507 0.001 runtime.py:719(exchange)
2000 0.249 0.000 1.053 0.001 shamir.py:30(share)
36000 0.233 0.000 1.174 0.000 runtime.py:754(<lambda>)
15000/4000 0.203 0.000 3.775 0.001
runtime.py:534(schedule_callback)
15006 0.197 0.000 1.249 0.000 runtime.py:608(_expect_share)
19009 0.195 0.000 0.712 0.000 basic.py:357(sendString)
34000 0.187 0.000 0.697 0.000 runtime.py:1102(<lambda>)
2000 0.178 0.000 1.254 0.001
prss.py:69(convert_replicated_shamir)
504 0.176 0.000 0.263 0.001 defer.py:458(__init__)
88000 0.167 0.000 0.167 0.000 matrix.py:72(__getitem__)
6000 0.160 0.000 0.160 0.000 prss.py:260(__init__)
6000 0.155 0.000 0.155 0.000 prss.py:326(__call__)
37000 0.150 0.000 4.225 0.000 runtime.py:144(split_result)
34000 0.146 0.000 5.500 0.000 runtime.py:105(__rmul__)
I'm not really sure how to interpret this... If any of you want to
investigate, then here's a link to the manual:
http://docs.python.org/lib/module-profile.html
:-)
--
Martin Geisler
_______________________________________________
viff-devel mailing list (http://viff.dk/)
[email protected]
http://lists.viff.dk/listinfo.cgi/viff-devel-viff.dk