diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2007-05-04 15:38:12 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2007-05-04 15:38:12 +0000 |
commit | 0cee348b78bdb6ef7da48ae6682c17dd75dc2fd4 (patch) | |
tree | 5ddf0f9f795722919213a40a1425bad4346954ea /bench.cpp | |
parent | 48e0b8231e112953680cacd9fa2bb6157184a657 (diff) | |
download | cryptopp-0cee348b78bdb6ef7da48ae6682c17dd75dc2fd4.tar.gz |
increase buffer sizes
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@341 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'bench.cpp')
-rw-r--r-- | bench.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -87,7 +87,7 @@ void OutputResultOperations(const char *name, const char *operation, bool pc, un void BenchMark(const char *name, BlockTransformation &cipher, double timeTotal) { - const int BUF_SIZE = RoundDownToMultipleOf(1024U, cipher.OptimalNumberOfParallelBlocks() * cipher.BlockSize()); + const int BUF_SIZE = RoundUpToMultipleOf(2048U, cipher.OptimalNumberOfParallelBlocks() * cipher.BlockSize()); AlignedSecByteBlock buf(BUF_SIZE); const int nBlocks = BUF_SIZE / cipher.BlockSize(); clock_t start = clock(); @@ -108,7 +108,7 @@ void BenchMark(const char *name, BlockTransformation &cipher, double timeTotal) void BenchMark(const char *name, StreamTransformation &cipher, double timeTotal) { - const int BUF_SIZE=RoundDownToMultipleOf(1024U, cipher.OptimalBlockSize()); + const int BUF_SIZE=RoundUpToMultipleOf(2048U, cipher.OptimalBlockSize()); AlignedSecByteBlock buf(BUF_SIZE); clock_t start = clock(); @@ -128,7 +128,7 @@ void BenchMark(const char *name, StreamTransformation &cipher, double timeTotal) void BenchMark(const char *name, HashTransformation &ht, double timeTotal) { - const int BUF_SIZE=1024; + const int BUF_SIZE=2048U; AlignedSecByteBlock buf(BUF_SIZE); LC_RNG rng((word32)time(NULL)); rng.GenerateBlock(buf, BUF_SIZE); @@ -150,7 +150,7 @@ void BenchMark(const char *name, HashTransformation &ht, double timeTotal) void BenchMark(const char *name, BufferedTransformation &bt, double timeTotal) { - const int BUF_SIZE=1024; + const int BUF_SIZE=2048U; AlignedSecByteBlock buf(BUF_SIZE); LC_RNG rng((word32)time(NULL)); rng.GenerateBlock(buf, BUF_SIZE); @@ -170,7 +170,7 @@ void BenchMark(const char *name, BufferedTransformation &bt, double timeTotal) OutputResultBytes(name, double(blocks) * BUF_SIZE, timeTaken); } -void BenchMarkKeying(SimpleKeyingInterface &c, unsigned int keyLength, const NameValuePairs ¶ms) +void BenchMarkKeying(SimpleKeyingInterface &c, size_t keyLength, const NameValuePairs ¶ms) { unsigned long iterations = 0; clock_t start = clock(); |