Implementation notes: aarch64, pi3aplus, crypto_hash/sha512

Computer: pi3aplus
Microarchitecture: aarch64; Cortex-A53 (410fd034)
Architecture: aarch64
CPU ID: 410fd034
SUPERCOP version: 20240107
Operation: crypto_hash
Primitive: sha512
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
1652588 0 09534 840 728opensslgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121520231212
1652584 0 08502 824 720opensslgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121520231212
1652884 0 09358 840 728opensslgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121520231212
1655436 0 011312 776 736opensslclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121520231212
1655788 0 010839 848 744opensslgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121520231212
18597596 0 022080 840 744refgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121520231212
18598620 0 022629 768 736refclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121520231212
19218508 0 019647 816 720refgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121520231212
19415576 0 020735 832 728refgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121520231212
19479576 0 020567 832 728refgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121520231212
257994584 0 014056 840 728sphlib-smallgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121520231212
258044584 0 014056 840 728sphlibgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121520231212
263923628 0 014789 768 736sphlibclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121520231212
264043628 0 014797 768 736sphlib-smallclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121520231212
269436648 0 017344 840 744sphlibgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121520231212
269716648 0 017344 840 744sphlib-smallgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121520231212
275603884 0 012320 824 720sphlibgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121520231212
275603884 0 012328 824 720sphlib-smallgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121520231212
303532056 0 013205 768 736compactclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011920240107
349164048 0 014688 840 744compactgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011920240107
353294220 0 013504 840 728sphlib-smallgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121520231212
353304220 0 013504 840 728sphlibgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121520231212
485711756 0 011087 832 728compactgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011920240107
501561548 0 09839 816 720compactgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011920240107
563971684 0 010839 832 728compactgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011920240107

Compiler output

Implementation: blocksplusavx
Security model: constbranchindex
Compiler: clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
hash.c: In file included from hash.c:1:
hash.c: In file included from /usr/lib/llvm-7/lib/clang/7.0.1/include/immintrin.h:28:
hash.c: /usr/lib/llvm-7/lib/clang/7.0.1/include/mmintrin.h:64:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
hash.c: return (__m64)__builtin_ia32_vec_init_v2si(__i, 0);
hash.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hash.c: /usr/lib/llvm-7/lib/clang/7.0.1/include/mmintrin.h:143:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
hash.c: return (__m64)__builtin_ia32_packsswb((__v4hi)__m1, (__v4hi)__m2);
hash.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hash.c: /usr/lib/llvm-7/lib/clang/7.0.1/include/mmintrin.h:173:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
hash.c: return (__m64)__builtin_ia32_packssdw((__v2si)__m1, (__v2si)__m2);
hash.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hash.c: /usr/lib/llvm-7/lib/clang/7.0.1/include/mmintrin.h:203:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
hash.c: return (__m64)__builtin_ia32_packuswb((__v4hi)__m1, (__v4hi)__m2);
hash.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hash.c: /usr/lib/llvm-7/lib/clang/7.0.1/include/mmintrin.h:230:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
hash.c: return (__m64)__builtin_ia32_punpckhbw((__v8qi)__m1, (__v8qi)__m2);
hash.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hash.c: /usr/lib/llvm-7/lib/clang/7.0.1/include/mmintrin.h:253:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
hash.c: return (__m64)__builtin_ia32_punpckhwd((__v4hi)__m1, (__v4hi)__m2);
hash.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hash.c: /usr/lib/llvm-7/lib/clang/7.0.1/include/mmintrin.h:274:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
hash.c: return (__m64)__builtin_ia32_punpckhdq((__v2si)__m1, (__v2si)__m2);
hash.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hash.c: /usr/lib/llvm-7/lib/clang/7.0.1/include/mmintrin.h:301:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
hash.c: return (__m64)__builtin_ia32_punpcklbw((__v8qi)__m1, (__v8qi)__m2);
hash.c: ...

Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE blocksplusavx

Compiler output

Implementation: blocksplusavx
Security model: constbranchindex
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
hash.c: hash.c:1:10: fatal error: immintrin.h: No such file or directory
hash.c: #include <immintrin.h>
hash.c: ^~~~~~~~~~~~~
hash.c: compilation terminated.

Number of similar (compiler,implementation) pairs: 4, namely:
CompilerImplementations
gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE blocksplusavx
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE blocksplusavx
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE blocksplusavx
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE blocksplusavx

Compiler output

Implementation: cryptopp
Security model: constbranchindex
Compiler: g++ -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
hash.cpp: hash.cpp:1:10: fatal error: cryptopp/sha.h: No such file or directory
hash.cpp: #include <cryptopp/sha.h>
hash.cpp: ^~~~~~~~~~~~~~~~
hash.cpp: compilation terminated.

Number of similar (compiler,implementation) pairs: 4, namely:
CompilerImplementations
g++ -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE cryptopp
g++ -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE cryptopp
g++ -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE cryptopp
g++ -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE cryptopp

Compiler output

Implementation: rust_crypto
Security model: constbranchindex
Compiler: clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
try.c: Alarm clock

Number of similar (compiler,implementation) pairs: 5, namely:
CompilerImplementations
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE rust_crypto
gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE rust_crypto
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE rust_crypto
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE rust_crypto
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE rust_crypto

Compiler output

Implementation: rust_sha2
Security model: constbranchindex
Compiler: clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
try.c: error[E0277]: the trait bound `&mut [u8; 64]: std::convert::TryFrom<&mut [u8]>` is not satisfied
try.c: --> src/bin/measure.rs:17:29
try.c: |
try.c: 17 | let out:&mut[u8;64] = out.try_into().unwrap();
try.c: | ^^^^^^^^ the trait `std::convert::TryFrom<&mut [u8]>` is not implemented for `&mut [u8; 64]`
try.c: |
try.c: = help: the following implementations were found:
try.c: <&'a [T; _] as std::convert::TryFrom<&'a [T]>>
try.c: <&'a mut [T; _] as std::convert::TryFrom<&'a mut [T]>>
try.c: <[T; _] as std::convert::TryFrom<&[T]>>
try.c: = note: required because of the requirements on the impl of `std::convert::TryInto<&mut [u8; 64]>` for `&mut [u8]`
try.c:
try.c: error: aborting due to previous error
try.c:
try.c: For more information about this error, try `rustc --explain E0277`.
try.c: error: could not compile `crypto_hash_sha512`.
try.c:
try.c: To learn more, run the command again with --verbose.

Number of similar (compiler,implementation) pairs: 3, namely:
CompilerImplementations
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE rust_sha2
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE rust_sha2
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE rust_sha2

Compiler output

Implementation: rust_sha2
Security model: constbranchindex
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
try.c: error[E0277]: the trait bound `&mut [u8; 64]: std::convert::TryFrom<&mut [u8]>` is not satisfied
try.c: --> src/bin/try.rs:17:29
try.c: |
try.c: 17 | let out:&mut[u8;64] = out.try_into().unwrap();
try.c: | ^^^^^^^^ the trait `std::convert::TryFrom<&mut [u8]>` is not implemented for `&mut [u8; 64]`
try.c: |
try.c: = help: the following implementations were found:
try.c: <&'a [T; _] as std::convert::TryFrom<&'a [T]>>
try.c: <&'a mut [T; _] as std::convert::TryFrom<&'a mut [T]>>
try.c: <[T; _] as std::convert::TryFrom<&[T]>>
try.c: = note: required because of the requirements on the impl of `std::convert::TryInto<&mut [u8; 64]>` for `&mut [u8]`
try.c:
try.c: error: aborting due to previous error
try.c:
try.c: For more information about this error, try `rustc --explain E0277`.
try.c: error: could not compile `crypto_hash_sha512`.
try.c:
try.c: To learn more, run the command again with --verbose.

Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE rust_sha2

Compiler output

Implementation: rust_sha2
Security model: constbranchindex
Compiler: gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE
try.c: error[E0277]: the trait bound `&mut [u8; 64]: std::convert::TryFrom<&mut [u8]>` is not satisfied
try.c: --> src/bin/try-small.rs:17:29
try.c: |
try.c: 17 | let out:&mut[u8;64] = out.try_into().unwrap();
try.c: | ^^^^^^^^ the trait `std::convert::TryFrom<&mut [u8]>` is not implemented for `&mut [u8; 64]`
try.c: |
try.c: = help: the following implementations were found:
try.c: <&'a [T; _] as std::convert::TryFrom<&'a [T]>>
try.c: <&'a mut [T; _] as std::convert::TryFrom<&'a mut [T]>>
try.c: <[T; _] as std::convert::TryFrom<&[T]>>
try.c: = note: required because of the requirements on the impl of `std::convert::TryInto<&mut [u8; 64]>` for `&mut [u8]`
try.c:
try.c: error: aborting due to previous error
try.c:
try.c: For more information about this error, try `rustc --explain E0277`.
try.c: error: could not compile `crypto_hash_sha512`.
try.c:
try.c: To learn more, run the command again with --verbose.

Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE rust_sha2