Implementation notes: amd64, margaux, crypto_kem/ntruhps2048509

Computer: margaux
Microarchitecture: amd64; Core 2 65nm (6fb)
Architecture: amd64
CPU ID: GenuineIntel-000006fb-bfebfbff
SUPERCOP version: 20240107
Operation: crypto_kem
Primitive: ntruhps2048509
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
184539295769 0 0174736 868 1728T:compactclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010720240107
191762623502 0 0103102 828 1760T:compactgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010720240107
194054437274 0 0120824 868 1728compactclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010720240107
196829295769 0 0180368 868 1728compactclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010720240107
197960823502 0 0108830 828 1760compactgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010720240107
207615337274 0 0115128 868 1728T:compactclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010720240107
2087690104837 0 0184272 868 1728T:compactclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010720240107
2180355104837 0 0189936 868 1728compactclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010720240107
54003007333 0 083954 860 1728T:refclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122920231212
540100418034 0 096776 868 1728T:refclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122920231212
540312237831 0 0117736 868 1728T:refclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122920231212
541799838848 0 0118472 868 1728T:refclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122920231212
542797718034 0 0102440 868 1728refclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122920231212
54283217333 0 089618 860 1728refclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122920231212
542950137831 0 0123368 868 1728refclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122920231212
544401638848 0 0124136 868 1728refclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122920231212
54786887537 0 085112 868 1728T:compactclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010720240107
54888617537 0 090776 868 1728compactclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010720240107
57136045614 0 082450 860 1728T:compactclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010720240107
57408005614 0 088082 860 1728compactclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010720240107
604351614691 0 093854 828 1760T:refgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122920231212
607002414691 0 099486 828 1760refgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122920231212
61034515234 0 083790 828 1760T:compactgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010720240107
61169998065 0 086206 828 1760T:refgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122920231212
61306355234 0 089454 828 1760compactgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010720240107
61430788065 0 091870 828 1760refgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122920231212
65109596775 0 084304 868 1728T:refclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122920231212
65380376775 0 090032 868 1728refclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122920231212
65447837200 0 083494 820 1728T:refgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122920231212
65716117200 0 089222 820 1728refgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122920231212
66714697750 0 085116 820 1760T:refgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122920231212
66969077750 0 090780 820 1760refgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122920231212
69998764780 0 082708 820 1760T:compactgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010720240107
70278994780 0 088372 820 1760compactgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010720240107
72491884118 0 080950 820 1728T:compactgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010720240107
72942344118 0 086678 820 1728compactgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010720240107

Compiler output

Implementation: avx2
Security model: constbranchindex
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
poly_r2_inv.c: poly_r2_inv.c:19:14: error: always_inline function '_pext_u64' requires target feature 'bmi2', but would be inlined into function 'crypto_kem_ntruhps2048509_avx2_constbranchindex_poly_R2_tobytes' that is compiled without support for 'bmi2'
poly_r2_inv.c: out[i] = _pext_u64(coeff_pointer[2*i], 0x1000100010001);
poly_r2_inv.c: ^
poly_r2_inv.c: poly_r2_inv.c:20:15: error: always_inline function '_pext_u64' requires target feature 'bmi2', but would be inlined into function 'crypto_kem_ntruhps2048509_avx2_constbranchindex_poly_R2_tobytes' that is compiled without support for 'bmi2'
poly_r2_inv.c: out[i] |= _pext_u64(coeff_pointer[2*i+1], 0x1000100010001) << 4;
poly_r2_inv.c: ^
poly_r2_inv.c: poly_r2_inv.c:22:12: error: always_inline function '_pext_u64' requires target feature 'bmi2', but would be inlined into function 'crypto_kem_ntruhps2048509_avx2_constbranchindex_poly_R2_tobytes' that is compiled without support for 'bmi2'
poly_r2_inv.c: out[i] = _pext_u64(coeff_pointer[2*63], 0x1000100010001);
poly_r2_inv.c: ^
poly_r2_inv.c: poly_r2_inv.c:23:13: error: always_inline function '_pext_u64' requires target feature 'bmi2', but would be inlined into function 'crypto_kem_ntruhps2048509_avx2_constbranchindex_poly_R2_tobytes' that is compiled without support for 'bmi2'
poly_r2_inv.c: out[i] |= _pext_u64(coeff_pointer[2*63+1], 0x1) << 4;
poly_r2_inv.c: ^
poly_r2_inv.c: 4 errors generated.

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

Compiler output

Implementation: T:avx2
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
poly_r2_inv.c: poly_r2_inv.c:19:14: error: always_inline function '_pext_u64' requires target feature 'bmi2', but would be inlined into function 'crypto_kem_ntruhps2048509_avx2_timingleaks_poly_R2_tobytes' that is compiled without support for 'bmi2'
poly_r2_inv.c: out[i] = _pext_u64(coeff_pointer[2*i], 0x1000100010001);
poly_r2_inv.c: ^
poly_r2_inv.c: poly_r2_inv.c:20:15: error: always_inline function '_pext_u64' requires target feature 'bmi2', but would be inlined into function 'crypto_kem_ntruhps2048509_avx2_timingleaks_poly_R2_tobytes' that is compiled without support for 'bmi2'
poly_r2_inv.c: out[i] |= _pext_u64(coeff_pointer[2*i+1], 0x1000100010001) << 4;
poly_r2_inv.c: ^
poly_r2_inv.c: poly_r2_inv.c:22:12: error: always_inline function '_pext_u64' requires target feature 'bmi2', but would be inlined into function 'crypto_kem_ntruhps2048509_avx2_timingleaks_poly_R2_tobytes' that is compiled without support for 'bmi2'
poly_r2_inv.c: out[i] = _pext_u64(coeff_pointer[2*63], 0x1000100010001);
poly_r2_inv.c: ^
poly_r2_inv.c: poly_r2_inv.c:23:13: error: always_inline function '_pext_u64' requires target feature 'bmi2', but would be inlined into function 'crypto_kem_ntruhps2048509_avx2_timingleaks_poly_R2_tobytes' that is compiled without support for 'bmi2'
poly_r2_inv.c: out[i] |= _pext_u64(coeff_pointer[2*63+1], 0x1) << 4;
poly_r2_inv.c: ^
poly_r2_inv.c: 4 errors generated.

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

Compiler output

Implementation: avx2
Security model: constbranchindex
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
poly_r2_inv.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/x86gprintrin.h:43,
poly_r2_inv.c: from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:27,
poly_r2_inv.c: from poly_r2_inv.c:1:
poly_r2_inv.c: poly_r2_inv.c: In function 'crypto_kem_ntruhps2048509_avx2_constbranchindex_poly_R2_tobytes':
poly_r2_inv.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/bmi2intrin.h:76:1: error: inlining failed in call to 'always_inline' '_pext_u64': target specific option mismatch
poly_r2_inv.c: 76 | _pext_u64 (unsigned long long __X, unsigned long long __Y)
poly_r2_inv.c: | ^~~~~~~~~
poly_r2_inv.c: poly_r2_inv.c:20:15: note: called from here
poly_r2_inv.c: 20 | out[i] |= _pext_u64(coeff_pointer[2*i+1], 0x1000100010001) << 4;
poly_r2_inv.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
poly_r2_inv.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/x86gprintrin.h:43,
poly_r2_inv.c: from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:27,
poly_r2_inv.c: from poly_r2_inv.c:1:
poly_r2_inv.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/bmi2intrin.h:76:1: error: inlining failed in call to 'always_inline' '_pext_u64': target specific option mismatch
poly_r2_inv.c: 76 | _pext_u64 (unsigned long long __X, unsigned long long __Y)
poly_r2_inv.c: | ^~~~~~~~~
poly_r2_inv.c: poly_r2_inv.c:19:14: note: called from here
poly_r2_inv.c: 19 | out[i] = _pext_u64(coeff_pointer[2*i], 0x1000100010001);
poly_r2_inv.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
poly_r2_inv.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/x86gprintrin.h:43,
poly_r2_inv.c: from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:27,
poly_r2_inv.c: from poly_r2_inv.c:1:
poly_r2_inv.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/bmi2intrin.h:76:1: error: inlining failed in call to 'always_inline' '_pext_u64': target specific option mismatch
poly_r2_inv.c: 76 | _pext_u64 (unsigned long long __X, unsigned long long __Y)
poly_r2_inv.c: | ^~~~~~~~~
poly_r2_inv.c: ...

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

Compiler output

Implementation: T:avx2
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
poly_r2_inv.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/x86gprintrin.h:43,
poly_r2_inv.c: from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:27,
poly_r2_inv.c: from poly_r2_inv.c:1:
poly_r2_inv.c: poly_r2_inv.c: In function 'crypto_kem_ntruhps2048509_avx2_timingleaks_poly_R2_tobytes':
poly_r2_inv.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/bmi2intrin.h:76:1: error: inlining failed in call to 'always_inline' '_pext_u64': target specific option mismatch
poly_r2_inv.c: 76 | _pext_u64 (unsigned long long __X, unsigned long long __Y)
poly_r2_inv.c: | ^~~~~~~~~
poly_r2_inv.c: poly_r2_inv.c:20:15: note: called from here
poly_r2_inv.c: 20 | out[i] |= _pext_u64(coeff_pointer[2*i+1], 0x1000100010001) << 4;
poly_r2_inv.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
poly_r2_inv.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/x86gprintrin.h:43,
poly_r2_inv.c: from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:27,
poly_r2_inv.c: from poly_r2_inv.c:1:
poly_r2_inv.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/bmi2intrin.h:76:1: error: inlining failed in call to 'always_inline' '_pext_u64': target specific option mismatch
poly_r2_inv.c: 76 | _pext_u64 (unsigned long long __X, unsigned long long __Y)
poly_r2_inv.c: | ^~~~~~~~~
poly_r2_inv.c: poly_r2_inv.c:19:14: note: called from here
poly_r2_inv.c: 19 | out[i] = _pext_u64(coeff_pointer[2*i], 0x1000100010001);
poly_r2_inv.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
poly_r2_inv.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/x86gprintrin.h:43,
poly_r2_inv.c: from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:27,
poly_r2_inv.c: from poly_r2_inv.c:1:
poly_r2_inv.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/bmi2intrin.h:76:1: error: inlining failed in call to 'always_inline' '_pext_u64': target specific option mismatch
poly_r2_inv.c: 76 | _pext_u64 (unsigned long long __X, unsigned long long __Y)
poly_r2_inv.c: | ^~~~~~~~~
poly_r2_inv.c: ...

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