From a39539afdf39fe525ed7512aafb92733d2fe358c Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Sun, 13 Feb 2011 17:48:37 +0100 Subject: First take on using AES-NI instructions This first naive use of the new Intel AES-NI instructions boosts the performance of AES on CPUs supporting this by 3 to 5 times. Results from running ./benchmark --cipher-repetitions 10 --large-buffers cipher aes on a cpu family : 6 model : 37 model name : Intel(R) Core(TM) i5 CPU 660 @ 3.33GHz stepping : 2 cpu MHz : 3325.494 cache size : 4096 KB cpu cores : 2 yields this: ECB/Stream CBC CFB OFB CTR --------------- --------------- --------------- --------------- --------------- 130ms 110ms 110ms 100ms 110ms 110ms 160ms 150ms 170ms 170ms 40ms 40ms 20ms 30ms 30ms 20ms 70ms 70ms 80ms 80ms The first line is with runtime switched off AES-NI instructions (don't set use_aesni in do_setkey), the second with enabled AES-NI. By fixing the alignment, I hope to squeeze out a little more even with this naive implementation. --- README | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'README') diff --git a/README b/README index 514464ab..6fe1cfb5 100644 --- a/README +++ b/README @@ -170,6 +170,12 @@ available. Try this if you get problems with assembler code. + --disable-aesni-support + Disable support for the AES-NI instructions of + newer Intel CPUs. The default is to use AES-NI + if available. Try this if you get problems with + assembler code. + --disable-O-flag-munging Some code is too complex for some compilers while in higher optimization modes, thus the compiler -- cgit v1.2.1