Libgcrypt performance, 1.6 vs 1.5 (on i386, arm & amd64)

Jussi Kivilinna jussi.kivilinna at iki.fi
Wed Oct 23 18:12:01 CEST 2013


Hello,

I wanted to check how much has the performance of libgcrypt improved in 1.6 (for
block ciphers and hashes). And since the results weren't all bad, I'll wanted to
share them here :)

So, here's benchmark results on few architectures comparing performance of 1.5.3
and 1.6-git. First is results on i386, which shows 'baseline' of improvement;
that is, performance improvements without new assembly implementations. After
i386, there's results for AMD64 and ARM which show the additional speed-up with
the help of assembly implementations.

-Jussi

libgcrypt 1.6-git vs 1.5.3:

Intel Atom N270 (i386, Debian wheezy):

Hash:
                buf     buf/10  1       putc    large
               ---------------------------------------
MD5             1.18x   1.72x   1.09x   1.11x   1.12x
SHA1            1.11x   1.39x   1.07x   1.11x   1.15x
RIPEMD160       1.35x   1.61x   1.12x   1.24x   1.21x
TIGER192        1.04x   1.34x   1.27x   1.04x   1.05x
SHA256          1.27x   1.74x   1.26x   1.19x   1.19x
SHA384          1.11x   1.54x   1.19x   1.11x   1.06x
SHA512          1.11x   1.56x   1.19x   1.09x   1.03x
SHA224          1.26x   1.77x   1.26x   1.22x   1.22x
MD4             1.17x   1.96x   1.07x   1.23x   1.09x
CRC32           1.09x   1.00x   1.00x   1.13x   1.09x
CRC32RFC1510    0.92x   1.00x   1.00x   1.00x   1.00x
CRC24RFC2440    1.01x   1.00x   1.02x   1.00x   1.00x
WHIRLPOOL       1.00x   0.99x   0.88x   1.02x   1.01x
TIGER           1.03x   1.31x   1.25x   1.03x   1.00x
TIGER2          1.03x   1.33x   1.26x   1.02x   1.01x

Cipher:
                  ECB/Stream         CBC             CFB             OFB             CTR      
               --------------- --------------- --------------- --------------- ---------------
IDEA            1.37x   1.38x   1.44x   1.51x   1.39x   1.40x   1.36x   1.37x   1.89x   1.88x
3DES            1.16x   1.16x   1.21x   1.22x   1.18x   1.17x   1.17x   1.17x   1.36x   1.38x
CAST5           1.80x   1.83x   1.92x   2.22x   1.78x   1.95x   1.71x   1.76x   3.13x   3.16x
BLOWFISH        1.95x   2.11x   2.05x   2.62x   2.00x   2.15x   1.81x   1.88x   3.40x   3.34x
AES             1.34x   1.29x   1.09x   1.06x   1.10x   1.10x   1.35x   1.37x   1.09x   1.09x
AES192          1.26x   1.26x   1.07x   1.05x   1.08x   1.09x   1.31x   1.31x   1.08x   1.07x
AES256          1.21x   1.22x   1.06x   1.06x   1.08x   1.07x   1.26x   1.27x   1.08x   1.07x
TWOFISH         1.52x   1.45x   1.62x   1.69x   1.59x   1.67x   1.53x   1.57x   2.77x   2.74x
ARCFOUR         1.00x   1.02x
DES             1.52x   1.49x   1.56x   1.62x   1.53x   1.53x   1.53x   1.53x   2.05x   2.06x
TWOFISH128      1.45x   1.47x   1.64x   1.71x   1.58x   1.66x   1.53x   1.52x   2.75x   2.71x
SERPENT128      1.60x   1.62x   1.74x   1.80x   1.63x   1.77x   1.64x   1.64x   2.55x   2.55x
SERPENT192      1.62x   1.63x   1.73x   1.79x   1.66x   1.74x   1.65x   1.61x   2.53x   2.58x
SERPENT256      1.61x   1.60x   1.69x   1.77x   1.69x   1.73x   1.64x   1.68x   2.56x   2.56x
RFC2268_40      0.97x   1.03x   1.06x   1.23x   0.99x   1.03x   1.01x   1.03x   1.51x   1.51x
SEED            1.47x   1.46x   1.58x   1.58x   1.55x   1.53x   1.51x   1.52x   2.38x   2.43x
CAMELLIA128     3.12x   3.13x   3.17x   3.30x   3.08x   3.27x   3.05x   3.06x   4.12x   4.14x
CAMELLIA192     2.65x   2.63x   2.69x   2.79x   2.63x   2.76x   2.62x   2.64x   3.42x   3.37x
CAMELLIA256     2.65x   2.65x   2.67x   2.80x   2.65x   2.74x   2.62x   2.61x   3.42x   3.43x

ARM Cortex-A8 (armhf, Debian jessie):

Hash:
                buf     buf/10  1       putc    large
               ---------------------------------------
MD5             1.09x   1.40x   1.04x   0.98x   1.05x
SHA1            1.33x   1.57x   1.05x   1.18x   1.27x
RIPEMD160       1.02x   1.24x   0.99x   1.01x   0.96x
TIGER192        1.02x   1.22x   1.31x   0.91x   1.00x
SHA256          1.16x   1.69x   1.22x   1.11x   1.11x
SHA384          4.25x   4.50x   1.88x   3.56x   4.17x
SHA512          4.26x   4.54x   1.88x   3.59x   4.17x
SHA224          1.16x   1.68x   1.20x   1.10x   1.11x
MD4             0.95x   1.51x   1.02x   1.00x   0.94x
CRC32           1.00x   0.96x   1.01x   1.00x   1.04x
CRC32RFC1510    1.00x   0.96x   1.00x   1.00x   1.04x
CRC24RFC2440    1.00x   1.00x   1.01x   1.00x   1.01x
WHIRLPOOL       1.27x   1.24x   1.12x   1.26x   1.26x
TIGER           1.01x   1.21x   1.31x   0.95x   0.99x
TIGER2          1.02x   1.21x   1.31x   0.92x   1.00x

Cipher:
                  ECB/Stream         CBC             CFB             OFB             CTR      
               --------------- --------------- --------------- --------------- ---------------
IDEA            1.30x   1.30x   1.38x   1.43x   1.32x   1.36x   1.39x   1.35x   1.64x   1.63x
3DES            1.21x   1.21x   1.27x   1.30x   1.23x   1.22x   1.26x   1.25x   1.42x   1.42x
CAST5           2.02x   2.07x   2.18x   3.36x   1.83x   3.01x   2.17x   2.14x   4.13x   4.22x
BLOWFISH        2.07x   2.04x   2.24x   3.42x   2.10x   3.08x   2.19x   2.19x   4.48x   4.48x
AES             2.79x   2.90x   2.28x   2.52x   2.32x   2.30x   2.83x   2.84x   2.29x   2.29x
AES192          2.73x   2.88x   2.32x   2.45x   2.34x   2.34x   2.78x   2.74x   2.25x   2.25x
AES256          2.75x   2.79x   2.35x   2.56x   2.42x   2.38x   2.75x   2.70x   2.36x   2.34x
TWOFISH         1.92x   1.91x   2.17x   2.33x   2.03x   2.18x   2.07x   2.08x   3.21x   3.24x
ARCFOUR         1.17x   1.19x
DES             1.51x   1.51x   1.62x   1.72x   1.56x   1.54x   1.62x   1.60x   1.99x   2.02x
TWOFISH128      1.92x   1.91x   2.15x   2.35x   2.04x   2.16x   2.08x   2.07x   3.23x   3.23x
SERPENT128      1.33x   1.28x   1.46x   1.53x   1.41x   1.42x   1.42x   1.45x   2.04x   2.02x
SERPENT192      1.32x   1.29x   1.46x   1.53x   1.40x   1.46x   1.45x   1.45x   2.03x   2.03x
SERPENT256      1.33x   1.28x   1.43x   1.53x   1.41x   1.46x   1.44x   1.44x   2.03x   2.03x
RFC2268_40      0.97x   1.00x   1.07x   1.17x   1.02x   0.99x   1.09x   1.11x   1.26x   1.27x
SEED            1.35x   1.35x   1.50x   1.55x   1.44x   1.43x   1.48x   1.47x   2.02x   2.01x
CAMELLIA128     4.52x   4.52x   4.53x   4.80x   4.42x   4.69x   4.35x   4.36x   5.50x   5.40x
CAMELLIA192     3.83x   3.82x   3.89x   4.08x   3.80x   3.97x   3.76x   3.79x   4.58x   4.58x
CAMELLIA256     3.80x   3.80x   3.88x   4.08x   3.80x   3.97x   3.77x   3.80x   4.58x   4.59x

Intel Core i5-4570 (amd64, Ubuntu saucy):

Hash:
                buf     buf/10  1       putc    large
               ---------------------------------------
MD5             1.03x   1.40x   1.14x   1.02x   0.99x
SHA1            1.08x   1.34x   1.14x   1.04x   1.03x
RIPEMD160       1.02x   1.32x   1.20x   1.02x   0.99x
TIGER192        1.07x   1.71x   1.34x   1.06x   1.01x
SHA256          1.15x   1.64x   1.31x   1.09x   1.08x
SHA384          1.18x   2.23x   1.33x   1.12x   1.02x
SHA512          1.18x   2.22x   1.33x   1.12x   1.02x
SHA224          1.15x   1.64x   1.31x   1.09x   1.08x
MD4             1.05x   1.52x   1.09x   1.02x   1.00x
CRC32           1.00x   1.01x   1.09x   1.00x   1.03x
CRC32RFC1510    1.00x   0.99x   1.09x   1.01x   1.02x
CRC24RFC2440    0.99x   0.99x   0.96x   0.99x   0.99x
WHIRLPOOL       1.02x   0.98x   0.94x   1.01x   1.03x
TIGER           1.08x   1.70x   1.35x   1.05x   1.01x
TIGER2          1.09x   1.71x   1.34x   1.05x   1.02x

Cipher:
                  ECB/Stream         CBC             CFB             OFB             CTR      
               --------------- --------------- --------------- --------------- ---------------
IDEA            1.37x   1.37x   1.33x   1.49x   1.31x   1.46x   1.31x   1.32x   1.63x   1.63x
3DES            1.13x   1.12x   1.12x   1.15x   1.10x   1.14x   1.13x   1.13x   1.21x   1.21x
CAST5           1.36x   1.38x   1.33x   4.15x   1.30x   3.95x   1.34x   1.34x   4.99x   5.02x
BLOWFISH        1.69x   1.62x   1.47x   5.22x   1.42x   5.05x   1.46x   1.47x   6.36x   6.37x
AES             14.11x  13.55x  3.46x   22.20x  3.61x   22.90x  4.65x   4.62x   17.92x  19.33x
AES192          13.26x  12.20x  3.41x   21.33x  3.58x   22.08x  4.41x   4.45x   17.80x  17.80x
AES256          12.52x  12.14x  3.38x   20.79x  3.49x   21.29x  4.26x   4.28x   17.65x  17.65x
TWOFISH         1.45x   1.45x   1.47x   2.41x   1.46x   2.35x   1.48x   1.50x   3.23x   3.23x
ARCFOUR         1.28x   1.27x
DES             1.35x   1.32x   1.28x   1.41x   1.27x   1.35x   1.32x   1.33x   1.53x   1.53x
TWOFISH128      1.44x   1.45x   1.47x   2.44x   1.46x   2.33x   1.49x   1.50x   3.23x   3.23x
SERPENT128      1.23x   1.15x   1.24x   8.02x   1.23x   9.00x   1.26x   1.24x   10.81x  10.65x
SERPENT192      1.23x   1.15x   1.24x   8.00x   1.24x   8.87x   1.26x   1.25x   10.65x  10.65x
SERPENT256      1.23x   1.15x   1.24x   8.02x   1.24x   8.85x   1.26x   1.25x   10.65x  10.65x
RFC2268_40      1.07x   0.99x   1.03x   1.08x   1.00x   1.02x   1.05x   1.04x   1.21x   1.21x
SEED            1.20x   1.22x   1.21x   1.27x   1.19x   1.25x   1.24x   1.24x   1.47x   1.46x
CAMELLIA128     3.12x   3.11x   3.00x   14.72x  2.97x   15.02x  3.07x   3.10x   16.82x  16.82x
CAMELLIA192     2.57x   2.59x   2.54x   12.34x  2.51x   12.42x  2.59x   2.59x   14.15x  13.93x
CAMELLIA256     2.56x   2.55x   2.51x   12.28x  2.50x   12.62x  2.56x   2.58x   13.96x  14.15x



More information about the Gcrypt-devel mailing list