[openssl/openssl] 3d68e2: md5: add assembly implementation for loongarch64

zhoumin2 noreply at github.com
Wed Dec 27 09:18:38 UTC 2023


  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: 3d68e2937ee5c50eacef5f4c34abdf7c0e4dc479
      https://github.com/openssl/openssl/commit/3d68e2937ee5c50eacef5f4c34abdf7c0e4dc479
  Author: Min Zhou <zhoumin at loongson.cn>
  Date:   2023-12-27 (Wed, 27 Dec 2023)

  Changed paths:
    A crypto/md5/asm/md5-loongarch64.pl
    M crypto/md5/build.info
    M crypto/md5/md5_local.h

  Log Message:
  -----------
  md5: add assembly implementation for loongarch64

This change can improve md5 performance by using a hand-optimized
assembly implementation of the inner loop of md5 calculation.
This implementation refered to md5-x86_64.pl and made more effort
to reorder instructions for separating data dependencies as much
as possible.

Test with:
$ openssl speed md5

3A5000
type             16 bytes    64 bytes     256 bytes    1024 bytes   8192 bytes   16384 bytes
md5              45061.04k   130440.75k   291105.28k   421101.23k   484639.27k   488320.43k
md5-modified     47179.95k   139015.57k   308836.69k   445963.26k   512540.67k   518215.00k
                   +5%         +7%          +6%          +6%          +6%          +6%

3A6000
type             16 bytes    64 bytes     256 bytes    1024 bytes   8192 bytes   16384 bytes
md5              60070.06k   161822.76k   325817.60k   438017.02k   486864.21k   492243.31k
md5-modified     62827.74k   170294.04k   343795.03k   463324.50k   515831.13k   520060.93k
                   +5%         +5%          +6%          +6%          +6%          +6%

Signed-off-by: Min Zhou <zhoumin at loongson.cn>
Co-authored-by: Xi Ruoyao <xry111 at xry111.site>

Reviewed-by: Shane Lontis <shane.lontis at oracle.com>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21704)




More information about the openssl-commits mailing list