Re: Performance tests of some AES implementations in C

From: Tom St Denis (tomstdenis_at_iahu.ca)
Date: 07/03/03


Date: Thu, 03 Jul 2003 00:31:37 GMT

Mok-Kong Shen wrote:
>
> Tom St Denis wrote:
>
> [snip]
>
>>With the default -O optimization.
>
> [snip]
>
> Could you also do a run with -O3? (I like to know
> how much the higher optimization level brings in
> general.) Thanks.

Athlon 2400+ niced to high prio, gcc 3.3 with -O3

results:

          ks (keys/s) enc. (bytes/s) dec. (bytes/s)
devine 2002463.03 60013878.00 50252837.42
gladman 2162910.39 44390187.82 38365625.28
mks 367693.01 43530901.92 42582636.19
nist 178414.19 1018546.77 668283.52
tom 2527773.88 62526865.95 43468222.78

With -O2

results:

          ks (keys/s) enc. (bytes/s) dec. (bytes/s)
devine 2039234.86 62904209.06 48514252.92
gladman 2102187.40 42676907.77 36455188.43
mks 373535.74 42892565.80 41307910.70
nist 180104.57 855886.85 526318.11
tom 2944120.49 46274874.37 39036292.45

With -O1

results:

          ks (keys/s) enc. (bytes/s) dec. (bytes/s)
devine 1965370.24 48438610.34 42151297.87
gladman 2358601.92 47654507.14 41611400.39
mks 378286.37 40971538.41 40763811.41
nist 176347.09 870119.69 572464.22
tom 2439678.92 45397799.22 56685326.94

With -O0 [optimizations disabled]

results:

          ks (keys/s) enc. (bytes/s) dec. (bytes/s)
devine 587307.67 27918338.83 27835527.24
gladman 1475840.46 30040460.83 28943037.35
mks 221602.23 31185435.28 30922056.64
nist 72792.26 551419.61 391679.19
tom 981879.39 24458661.05 25964121.34

I think this test shows that the -O1 through -O3 basically give the same
results. The jump from -O0 to -O1 is probably due to better register
allocation.

Tom



Relevant Pages