AES performance results

Adam Langley agl at
Tue Feb 27 01:05:23 UTC 2007

On 2/26/07, Nick Mathewson <nickm at> wrote:
> METHODOLOGY: I wrote a stupid benchmark function in aes.c to encrypt a
> million cell-sized chunks using our aes_crypt function, and timed it
> with the unix "time" command.  I did this twice for each
> (computer,code) pair, I took the median of three runs.

You have to be very careful of cache issues with micro-benchmarks like
that. I'm think that you're ok because the cache profile of an AES
function is probably pretty much fixed (it walks the input and the
output and the tables are of fixed size I'm guessing). But if the
faster impl uses different sized tables etc (or more code, looking at
FULL_UNROLL) you might find that, when running with the rest of the
Tor code, the results are rather different.


Adam Langley                                      agl at                       650-283-9641

More information about the tor-dev mailing list