aboutsummaryrefslogtreecommitdiffstats
path: root/src/block
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-09-30 01:29:06 +0000
committerlloyd <[email protected]>2009-09-30 01:29:06 +0000
commit59b4eb0bd2d1b9d65c3921f5205a012f1a98fdf8 (patch)
treede09a13123c73df9259031e76daae57a091ab43b /src/block
parent90180351e7370d0b6b93c2a69a5298bd4805ac83 (diff)
Disable prefetch in AES for now. Problem: with iterative modes like CBC,
the prefetch is called for each block of input, and so a total of (4096+256)/64 = 68 prefetches are executed for each block. This reduces performance of iterative modes dramatically. I'm not sure what the right approach for dealing with this is.
Diffstat (limited to 'src/block')
-rw-r--r--src/block/aes/aes.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/block/aes/aes.cpp b/src/block/aes/aes.cpp
index 8ef9cd8fe..34698ae7f 100644
--- a/src/block/aes/aes.cpp
+++ b/src/block/aes/aes.cpp
@@ -20,10 +20,6 @@ void AES::encrypt_n(const byte in[], byte out[], u32bit blocks) const
const u32bit* TE2 = TE + 512;
const u32bit* TE3 = TE + 768;
- PREFETCH::readonly(TE, 1024);
- PREFETCH::readonly(SE, 256);
- PREFETCH::cipher_fetch(in, out, blocks, this->BLOCK_SIZE);
-
for(u32bit i = 0; i != blocks; ++i)
{
u32bit T0 = load_be<u32bit>(in, 0) ^ EK[0];
@@ -118,10 +114,6 @@ void AES::decrypt_n(const byte in[], byte out[], u32bit blocks) const
const u32bit* TD2 = TD + 512;
const u32bit* TD3 = TD + 768;
- PREFETCH::readonly(TD, 1024);
- PREFETCH::readonly(SD, 256);
- PREFETCH::cipher_fetch(in, out, blocks, this->BLOCK_SIZE);
-
for(u32bit i = 0; i != blocks; ++i)
{
u32bit T0 = load_be<u32bit>(in, 0) ^ DK[0];