Implementation notes: amd64, h6sandy, crypto_dh/curve2251

Computer: h6sandy
Microarchitecture: amd64; Sandy Bridge (206a7)
Architecture: amd64
CPU ID: GenuineIntel-000206a7-bfebfbff
SUPERCOP version: 20240107
Operation: crypto_dh
Primitive: curve2251
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
58347466578 385024 95687912 385956 2720T:relic/amd64-avxclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121420231212
58403341223 385024 110461202 385908 2912T:relic/amd64-avxgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121420231212
58531333007 385024 95651834 385956 2720T:relic/amd64-avxclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121420231212
58688373491 385024 97296152 385956 2720T:relic/amd64-avxclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121420231212
58820054467 385024 110475714 385908 2912T:relic/amd64-avxgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121420231212
58932039878 385024 95659056 385956 2720T:relic/amd64-avxclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121420231212
59111563067 385024 97283784 385956 2720T:relic/amd64-avxclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121420231212
59581633943 385024 110453488 385900 2912T:relic/amd64-avxgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121420231212
61169630695 385024 110449298 385900 2912T:relic/amd64-avxgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121420231212
65673339854 385024 95659008 385956 2720T:relic/amd64-clmulclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121420231212
65967363043 385024 97283736 385956 2720T:relic/amd64-clmulclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121420231212
65974154443 385024 110475730 385908 2912T:relic/amd64-clmulgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121420231212
66246473467 385024 97296104 385956 2720T:relic/amd64-clmulclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121420231212
66423466554 385024 95687864 385956 2720T:relic/amd64-clmulclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121420231212
66612232983 385024 95651786 385956 2720T:relic/amd64-clmulclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121420231212
66633741199 385024 110461218 385908 2912T:relic/amd64-clmulgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121420231212
67247433919 385024 110453440 385900 2912T:relic/amd64-clmulgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121420231212
67825630671 385024 110449250 385900 2912T:relic/amd64-clmulgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121420231212
121457362739 385024 110483818 385908 2912T:relic/amd64-ssse3gcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121420231212
123811942215 385024 110461592 385900 2912T:relic/amd64-ssse3gcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121420231212
124137649495 385024 110469306 385908 2912T:relic/amd64-ssse3gcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121420231212
124534738967 385024 110457402 385900 2912T:relic/amd64-ssse3gcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121420231212
301427012176 0 843697 884 1824T:mpfqgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121420231212
362845430911 0 864955 884 1824T:mpfqgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121420231212
377919519168 0 851995 884 1824T:mpfqgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121420231212
380157118704 0 851115 884 1824T:mpfqgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121420231212

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