aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples/hash_quickly.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-02-20 21:10:26 +0000
committerlloyd <[email protected]>2012-02-20 21:10:26 +0000
commite5a1b8c4392b5383af133591cb9238fb8c1b4516 (patch)
treea3f2fdd46fa71ff88227881f81675038c70e79e0 /doc/examples/hash_quickly.cpp
parent018bfa3c50ec857ce93b44096fc1890dc7dd65a5 (diff)
The benchmark examples ran very slowly because they were passing
16*1024 to an argument that treated those values as KiB, it took the RNG ~3 seconds to create 16 MiB of data to randomize the input. Change to 16. Also cap the value that can be passed to --buf-size to 1024, for a 1 MiB buffer.
Diffstat (limited to 'doc/examples/hash_quickly.cpp')
-rw-r--r--doc/examples/hash_quickly.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/examples/hash_quickly.cpp b/doc/examples/hash_quickly.cpp
index 005a6d719..a18ab4fa6 100644
--- a/doc/examples/hash_quickly.cpp
+++ b/doc/examples/hash_quickly.cpp
@@ -34,7 +34,7 @@ void set_fastest_implementation(const std::string& algo,
Botan::Algorithm_Factory& af = Botan::global_state().algorithm_factory();
std::map<std::string, double> results =
- Botan::algorithm_benchmark(algo, af, rng, ms, 16*1024);
+ Botan::algorithm_benchmark(algo, af, rng, ms, 16);
std::string fastest_provider = "";
double best_res = 0;