viff

changeset 1013:ff55a7388ce6

Better output when benchmarking fake field elements.
author Martin Geisler <mg@daimi.au.dk>
date Thu, 06 Nov 2008 14:25:28 +0100
parents 464008ada9c2
children 17ee61639bc9
files apps/benchmark.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- a/apps/benchmark.py	Thu Nov 06 14:25:27 2008 +0100
     1.2 +++ b/apps/benchmark.py	Thu Nov 06 14:25:28 2008 +0100
     1.3 @@ -55,6 +55,7 @@
     1.4  
     1.5  import sys
     1.6  import time
     1.7 +from math import log
     1.8  from optparse import OptionParser
     1.9  import operator
    1.10  from pprint import pformat
    1.11 @@ -139,8 +140,10 @@
    1.12  
    1.13  if options.fake:
    1.14      Zp = FakeFieldElement
    1.15 +    print "Using fake field elements"
    1.16  else:
    1.17      Zp = GF(find_prime(options.modulus))
    1.18 +    print "Using real field elements (%d bit modulus)" % log(Zp.modulus, 2)
    1.19  count = options.count
    1.20  print "I am player %d, will %s %d numbers" % (id, options.operation, count)
    1.21