diff options
author | lloyd <[email protected]> | 2012-02-20 21:10:26 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2012-02-20 21:10:26 +0000 |
commit | e5a1b8c4392b5383af133591cb9238fb8c1b4516 (patch) | |
tree | a3f2fdd46fa71ff88227881f81675038c70e79e0 /doc/examples/benchmark.cpp | |
parent | 018bfa3c50ec857ce93b44096fc1890dc7dd65a5 (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/benchmark.cpp')
-rw-r--r-- | doc/examples/benchmark.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/examples/benchmark.cpp b/doc/examples/benchmark.cpp index 7ad1775e2..b5adb3d4f 100644 --- a/doc/examples/benchmark.cpp +++ b/doc/examples/benchmark.cpp @@ -33,7 +33,7 @@ int main(int argc, char* argv[]) std::string algo = argv[i]; std::map<std::string, double> results = - algorithm_benchmark(algo, af, rng, ms, 16*1024); + algorithm_benchmark(algo, af, rng, ms, 16); std::cout << algo << ":\n"; for(std::map<std::string, double>::iterator r = results.begin(); |