diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2016-01-22 11:36:06 +0100 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2016-01-22 11:36:06 +0100 |
commit | d3d10345b47c2b17922bb91059cfceea82f82338 (patch) | |
tree | 6a336d74ee41a4ba98b6b3d97f123cd0c5f4e9b7 /create_timing_table.py | |
parent | 541ee468b6b33c7ae27818bbfea63df9622f9d8a (diff) | |
download | rsa-git-d3d10345b47c2b17922bb91059cfceea82f82338.tar.gz |
Big refactor to become more PEP8 compliant.
Mostly focused on docstrings (''' → """), indentation, empty lines,
and superfluous parenthesis.
Diffstat (limited to 'create_timing_table.py')
-rwxr-xr-x | create_timing_table.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/create_timing_table.py b/create_timing_table.py index b6f8884..48cd1ff 100755 --- a/create_timing_table.py +++ b/create_timing_table.py @@ -21,8 +21,8 @@ import rsa poolsize = 8 accurate = True -def run_speed_test(bitsize): +def run_speed_test(bitsize): iterations = 0 start = end = time.time() @@ -35,10 +35,9 @@ def run_speed_test(bitsize): duration = end - start dur_per_call = duration / iterations - print '%5i bit: %9.3f sec. (%i iterations over %.1f seconds)' % (bitsize, - dur_per_call, iterations, duration) + print('%5i bit: %9.3f sec. (%i iterations over %.1f seconds)' % + (bitsize, dur_per_call, iterations, duration)) + for bitsize in (128, 256, 384, 512, 1024, 2048, 3072, 4096): run_speed_test(bitsize) - - |