Home GnuPG

GCM: Tweak Intel PCLMUL ghash loop for small speed-up
9b6764944284Unpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

GCM: Tweak Intel PCLMUL ghash loop for small speed-up

* cipher/cipher-gcm.c (do_ghash): Mark 'inline'.
[GCM_USE_INTEL_PCLMUL] (do_ghash_pclmul): Rename to...
[GCM_USE_INTEL_PCLMUL] (gfmul_pclmul): ..this and make inline function.
(ghash) [GCM_USE_INTEL_PCLMUL]: Preload data before ghash-pclmul loop.

Intel Haswell:
Old:
AES GCM enc | 1.12 ns/B 853.5 MiB/s 3.58 c/B

 GCM dec |      1.12 ns/B     853.4 MiB/s      3.58 c/B
GCM auth |     0.843 ns/B    1131.5 MiB/s      2.70 c/B

New:
AES GCM enc | 0.990 ns/B 963.3 MiB/s 3.17 c/B

 GCM dec |     0.982 ns/B     970.9 MiB/s      3.14 c/B
GCM auth |     0.711 ns/B    1340.8 MiB/s      2.28 c/B
  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Nov 19 2013, 10:26 PM
Parents
rCbd4bd23a2511: GCM: Use counter mode code for speed-up
Branches
Unknown
Tags
Unknown

Event Timeline

Jussi Kivilinna <jussi.kivilinna@iki.fi> committed rC9b6764944284: GCM: Tweak Intel PCLMUL ghash loop for small speed-up (authored by Jussi Kivilinna <jussi.kivilinna@iki.fi>).Nov 20 2013, 5:26 PM