diff options
author | Zooko O'Whielacronx <zooko@zooko.com> | 2012-07-12 10:19:56 -0300 |
---|---|---|
committer | Zooko O'Whielacronx <zooko@zooko.com> | 2012-07-12 10:19:56 -0300 |
commit | f80c907bdcf62621f2af52a36823656881610938 (patch) | |
tree | f17f62ecf70902dbd431dfc6011f702c96b8601f | |
parent | f52f6ab9cc1ea47f28ec1a820185feba4e3d7c3b (diff) |
don't benchmark hashes on small inputs
Like with the ciphers in the previous patch -- small inputs are too fast to measure.
-rw-r--r-- | src/pycryptopp/bench/bench_hashes.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/pycryptopp/bench/bench_hashes.py b/src/pycryptopp/bench/bench_hashes.py index 9ce1c86..c681ff8 100644 --- a/src/pycryptopp/bench/bench_hashes.py +++ b/src/pycryptopp/bench/bench_hashes.py @@ -1,6 +1,6 @@ from pycryptopp.hash import sha256 -from common import insecurerandstr, rep_bench, print_bench_footer +from common import insecurerandstr, rep_bench UNITS_PER_SECOND = 10**9 @@ -35,16 +35,13 @@ def bench_hashes(MAXTIME): print klass ob = klass() for (legend, size) in [ - ("small (%d B)", 1000), - ("medium (%d B)", 10000), - ("large (%d B)", 100000), + ("large (%d B)", 10**7), ]: print legend % size rep_bench(ob.proc, size, UNITS_PER_SECOND=UNITS_PER_SECOND, MAXTIME=MAXTIME, MAXREPS=100, initfunc=ob.proc_init) print print "nanoseconds per byte hashed" - print_bench_footer(UNITS_PER_SECOND=UNITS_PER_SECOND) print |