Home GnuPG

cipher-gcm-ppc: tweak loop structure a bit

Description

cipher-gcm-ppc: tweak loop structure a bit

* cipher/cipher-gcm-ppc.c (_gcry_ghash_ppc_vpmsum): Increament
'buf' pointer right after use; Use 'for' loop for inner 4-blocks
loop to allow compiler to better optimize loop.

Benchmark on POWER9:

Before:

|  nanosecs/byte   mebibytes/sec   cycles/byte

GMAC_AES | 0.226 ns/B 4211 MiB/s 0.521 c/B

After:

|  nanosecs/byte   mebibytes/sec   cycles/byte

GMAC_AES | 0.224 ns/B 4251 MiB/s 0.516 c/B

  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Apr 2 2023, 7:20 PM
Parents
rC3660935d2d50: doc: Add remark that leading zeroes are stripped from printed MPIs.
Branches
Unknown
Tags
Unknown