]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
crypto: arc4 - improve performance by using u32 for ctx and variables
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>
Sat, 9 Jun 2012 15:25:46 +0000 (18:25 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 14 Jun 2012 02:07:23 +0000 (10:07 +0800)
commitd366db605c8c4a9878589bc4a87e55f6063184ac
treea4984fee60973f52676ab9d9def30476ea0968bd
parentce6dd368984068c8938e8d3fba8e292ef63cee97
crypto: arc4 - improve performance by using u32 for ctx and variables

This patch changes u8 in struct arc4_ctx and variables to u32 (as AMD seems
to have problem with u8 array). Below are tcrypt results of old 1-byte block
cipher versus ecb(arc4) with u8 and ecb(arc4) with u32.

tcrypt results, x86-64 (speed ratios: new-u32/old, new-u8/old):

                  u32    u8
AMD Phenom II   : x3.6   x2.7
Intel Core 2    : x2.0   x1.9

tcrypt results, i386 (speed ratios: new-u32/old, new-u8/old):

                  u32    u8
Intel Atom N260 : x1.5   x1.4

Cc: Jon Oberheide <jon@oberheide.org>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/arc4.c