Implementation notes: amd64, bolero, crypto_dh/curve2251

Computer: bolero
Microarchitecture: amd64; Broadwell+AES (406f1)
Architecture: amd64
CPU ID: GenuineIntel-000406f1-1fc9cbf5
SUPERCOP version: 20240107
Operation: crypto_dh
Primitive: curve2251
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
38686867131 385024 97291705 385928 2600T:relic/amd64-avxclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
38759653981 385024 110478115 385880 2760T:relic/amd64-avxgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
38821677179 385024 972102057 385928 2600T:relic/amd64-clmulclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
38952432698 385024 97254435 385928 2632T:relic/amd64-avxclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
39010877203 385024 972102089 385928 2600T:relic/amd64-avxclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
39030039526 385024 95660545 385928 2568T:relic/amd64-avxclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
39489233718 385024 110455297 385872 2760T:relic/amd64-clmulgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
39506866554 385024 95689953 385928 2568T:relic/amd64-clmulclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
39646066578 385024 95689985 385928 2568T:relic/amd64-avxclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
39654033742 385024 110455329 385872 2760T:relic/amd64-avxgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
39727632674 385024 97254403 385928 2632T:relic/amd64-clmulclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
39814430598 385024 110451299 385872 2760T:relic/amd64-avxgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
40235240965 385024 110463051 385880 2760T:relic/amd64-avxgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
40249640941 385024 110463019 385880 2760T:relic/amd64-clmulgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
40421253957 385024 110478083 385880 2760T:relic/amd64-clmulgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
41870030574 385024 110451267 385872 2760T:relic/amd64-clmulgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
44490867107 385024 97291673 385928 2600T:relic/amd64-clmulclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
46196039502 385024 95660513 385928 2568T:relic/amd64-clmulclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
113294438870 385024 110459403 385872 2760T:relic/amd64-ssse3gcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
115430849237 385024 110471155 385880 2760T:relic/amd64-ssse3gcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
118516042014 385024 110463433 385872 2760T:relic/amd64-ssse3gcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
155498562253 385024 110486219 385880 2760T:relic/amd64-ssse3gcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
277503212140 0 846466 856 1672T:mpfqgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
331174030707 0 868324 856 1672T:mpfqgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
334226819015 0 854668 856 1672T:mpfqgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
338102818555 0 853796 856 1672T:mpfqgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212

Compiler output

Implementation: T:mpfq
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
curve2_251.c: In file included from curve2_251.c:8:
curve2_251.c: In file included from ./field.h:1:
curve2_251.c: In file included from ./mpfq_2_251.h:5:
curve2_251.c: ./x86_64/mpfq_2_251.h:900:14: error: use of unknown builtin '__builtin_ia32_pslldqi128' [-Wimplicit-function-declaration]
curve2_251.c: r.s = t0 ^ SHLD(t1, 64);
curve2_251.c: ^
curve2_251.c: ./x86_64/mpfq_2_251.h:748:25: note: expanded from macro 'SHLD'
curve2_251.c: #define SHLD(x,r) (v2di)__builtin_ia32_pslldqi128 ((gcc43bugfix) (x),(r))
curve2_251.c: ^
curve2_251.c: ./x86_64/mpfq_2_251.h:900:14: error: invalid conversion between vector type 'v2di' (vector of 2 'uint64_t' values) and integer type 'int' of different size
curve2_251.c: r.s = t0 ^ SHLD(t1, 64);
curve2_251.c: ^~~~~~~~~~~~
curve2_251.c: ./x86_64/mpfq_2_251.h:748:19: note: expanded from macro 'SHLD'
curve2_251.c: #define SHLD(x,r) (v2di)__builtin_ia32_pslldqi128 ((gcc43bugfix) (x),(r))
curve2_251.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
curve2_251.c: ./x86_64/mpfq_2_251.h:907:14: error: use of unknown builtin '__builtin_ia32_psrldqi128' [-Wimplicit-function-declaration]
curve2_251.c: r.s = t2 ^ SHRD(t1, 64);
curve2_251.c: ^
curve2_251.c: ./x86_64/mpfq_2_251.h:749:25: note: expanded from macro 'SHRD'
curve2_251.c: #define SHRD(x,r) (v2di)__builtin_ia32_psrldqi128 ((gcc43bugfix) (x),(r))
curve2_251.c: ^
curve2_251.c: ./x86_64/mpfq_2_251.h:907:14: error: invalid conversion between vector type 'v2di' (vector of 2 'uint64_t' values) and integer type 'int' of different size
curve2_251.c: r.s = t2 ^ SHRD(t1, 64);
curve2_251.c: ^~~~~~~~~~~~
curve2_251.c: ./x86_64/mpfq_2_251.h:749:19: note: expanded from macro 'SHRD'
curve2_251.c: ...

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

Compiler output

Implementation: T:relic/amd64-avx
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
relic.c: In file included from relic.c:4:
relic.c: ./src/relic_rand.c:117:8: warning: implicit declaration of function 'time' is invalid in C99 [-Wimplicit-function-declaration]
relic.c: srand(time(NULL));
relic.c: ^
relic.c: 1 warning generated.
try.c: /usr/bin/ld: libcrypto_dh_curve2251.a(relic_low.o): warning: relocation in read-only section `.eh_frame'
try.c: /usr/bin/ld: warning: creating DT_TEXTREL in a PIE
try.c: /usr/bin/ld: libcrypto_dh_curve2251.a(relic_low.o): warning: relocation in read-only section `.eh_frame'
try.c: /usr/bin/ld: warning: creating DT_TEXTREL in a PIE
measure.c: /usr/bin/ld: libcrypto_dh_curve2251.a(relic_low.o): warning: relocation in read-only section `.eh_frame'
measure.c: /usr/bin/ld: warning: creating DT_TEXTREL in a PIE

Number of similar (compiler,implementation) pairs: 10, namely:
CompilerImplementations
clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-avx
clang -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-avx
clang -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-avx
clang -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-avx
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-avx
clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-clmul
clang -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-clmul
clang -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-clmul
clang -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-clmul
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-clmul

Compiler output

Implementation: T:relic/amd64-avx
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
relic.c: In file included from relic.c:4:
relic.c: src/relic_rand.c: In function 'rand_init':
relic.c: src/relic_rand.c:117:15: warning: implicit declaration of function 'time' [-Wimplicit-function-declaration]
relic.c: 117 | srand(time(NULL));
relic.c: | ^~~~
try.c: /usr/bin/ld: libcrypto_dh_curve2251.a(relic_low.o): warning: relocation in read-only section `.eh_frame'
try.c: /usr/bin/ld: warning: creating DT_TEXTREL in a PIE
try.c: /usr/bin/ld: libcrypto_dh_curve2251.a(relic_low.o): warning: relocation in read-only section `.eh_frame'
try.c: /usr/bin/ld: warning: creating DT_TEXTREL in a PIE
measure.c: /usr/bin/ld: libcrypto_dh_curve2251.a(relic_low.o): warning: relocation in read-only section `.eh_frame'
measure.c: /usr/bin/ld: warning: creating DT_TEXTREL in a PIE

Number of similar (compiler,implementation) pairs: 12, namely:
CompilerImplementations
gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:relic/amd64-avx
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:relic/amd64-avx
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE T:relic/amd64-avx
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE T:relic/amd64-avx
gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:relic/amd64-clmul
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:relic/amd64-clmul
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE T:relic/amd64-clmul
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE T:relic/amd64-clmul
gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:relic/amd64-ssse3
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:relic/amd64-ssse3
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE T:relic/amd64-ssse3
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE T:relic/amd64-ssse3

Compiler output

Implementation: T:relic/amd64-ssse3
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
relic.c: In file included from relic.c:4:
relic.c: ./src/relic_rand.c:117:8: warning: implicit declaration of function 'time' is invalid in C99 [-Wimplicit-function-declaration]
relic.c: srand(time(NULL));
relic.c: ^
relic.c: 1 warning generated.
relic_low.S: ./src/low/relic_fb_mul_low.s:2339:2: error: changed section type for .note.GNU-stack, expected: 0x7
relic_low.S: .section .note.GNU-stack,"",@progbits
relic_low.S: ^

Number of similar (compiler,implementation) pairs: 5, namely:
CompilerImplementations
clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-ssse3
clang -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-ssse3
clang -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-ssse3
clang -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-ssse3
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-ssse3