Implementation notes: amd64, margaux, crypto_kem/ntskem1380

Computer: margaux
Microarchitecture: amd64; Core 2 65nm (6fb)
Architecture: amd64
CPU ID: GenuineIntel-000006fb-bfebfbff
SUPERCOP version: 20240625
Operation: crypto_kem
Primitive: ntskem1380
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
1773939171866 84 16190589 980 1728T:sse2clang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240625
177783192475 84 16110101 980 1728T:sse2clang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240625
191812371893 84 1687567 972 1728T:sse2clang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240625
211601898495 84 16115029 980 1728T:sse2clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240625
2461796158768 84 16178981 980 1728T:optclang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240625
2545814159397 84 16179365 980 1728T:optclang_-mcpu=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240625
254797588220 84 16107421 980 1728T:optclang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240625
257884564932 84 1682167 972 1728T:optclang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240625
276437271864 84 1690695 956 1792T:optgcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240625
278459791481 84 16111439 956 1792T:optgcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240625
282469692112 84 16110189 980 1728T:optclang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240625
288804569162 84 1687279 956 1792T:optgcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240625
424773364834 84 1681758 948 1760T:optgcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240625
1980550129742 76 1647805 964 1728T:refclang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240625
2012700633499 76 1653383 924 1792T:refgcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240625
2146450539072 76 1659525 964 1728T:refclang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240625
2158912437609 76 1656965 964 1728T:refclang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240625
2207713339008 76 1659269 964 1728T:refclang_-mcpu=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240625
2234069226745 76 1645551 924 1792T:refgcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240625
2293242724088 76 1642191 924 1792T:refgcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240625
2337146022605 76 1639815 956 1728T:refclang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240625
2513763621163 76 1638078 916 1760T:refgcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240625

Compiler output


bitslice_fft_256.c: bitslice_fft_256.c:99:25: error: always_inline function '_mm256_set_epi64x' requires target feature 'avx', but would be inlined into function 'bitslice_butterflies13_256' that is compiled without support for 'avx'
bitslice_fft_256.c:             out[j][i] = _mm256_set_epi64x(-v3, -v2, -v1, -v0);
bitslice_fft_256.c:                         ^
bitslice_fft_256.c: bitslice_fft_256.c:99:25: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
bitslice_fft_256.c: bitslice_fft_256.c:112:20: error: '__builtin_ia32_permdi256' needs target feature avx2
bitslice_fft_256.c:             t[0] = _mm256_permute4x64_epi64(out[ j ][b], 0xD8);
bitslice_fft_256.c:                    ^
bitslice_fft_256.c: /usr/lib/llvm-14/lib/clang/14.0.0/include/avx2intrin.h:818:13: note: expanded from macro '_mm256_permute4x64_epi64'
bitslice_fft_256.c:   ((__m256i)__builtin_ia32_permdi256((__v4di)(__m256i)(V), (int)(M)))
bitslice_fft_256.c:             ^
bitslice_fft_256.c: bitslice_fft_256.c:113:20: error: '__builtin_ia32_permdi256' needs target feature avx2
bitslice_fft_256.c:             t[1] = _mm256_permute4x64_epi64(out[j+1][b], 0xD8);
bitslice_fft_256.c:                    ^
bitslice_fft_256.c: /usr/lib/llvm-14/lib/clang/14.0.0/include/avx2intrin.h:818:13: note: expanded from macro '_mm256_permute4x64_epi64'
bitslice_fft_256.c:   ((__m256i)__builtin_ia32_permdi256((__v4di)(__m256i)(V), (int)(M)))
bitslice_fft_256.c:             ^
bitslice_fft_256.c: bitslice_fft_256.c:114:20: error: '__builtin_ia32_permti256' needs target feature avx2
bitslice_fft_256.c:             v[b] = _mm256_permute2x128_si256(t[0], t[1], 0x20);
bitslice_fft_256.c:                    ^
bitslice_fft_256.c: /usr/lib/llvm-14/lib/clang/14.0.0/include/avx2intrin.h:821:13: note: expanded from macro '_mm256_permute2x128_si256'
bitslice_fft_256.c:   ((__m256i)__builtin_ia32_permti256((__m256i)(V1), (__m256i)(V2), (int)(M)))
bitslice_fft_256.c:             ^
bitslice_fft_256.c: bitslice_fft_256.c:115:20: error: '__builtin_ia32_permti256' needs target feature avx2
bitslice_fft_256.c:             u[b] = _mm256_permute2x128_si256(t[0], t[1], 0x31);
bitslice_fft_256.c:                    ^
bitslice_fft_256.c: ...

Number of similar (implementation,compiler) pairs: 4, namely:
ImplementationCompiler
T:avx2clang -march=native -O2 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
T:avx2clang -march=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
T:avx2clang -march=native -O -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
T:avx2clang -march=native -Os -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)

Compiler output


bitslice_bma_128.c: bitslice_bma_128.c:92:12: error: always_inline function '_mm_shuffle_epi8' requires target feature 'ssse3', but would be inlined into function 'bit_reverse' that is compiled without support for 'ssse3'
bitslice_bma_128.c:     return _mm_shuffle_epi8(x, _mm_set_epi8(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15));
bitslice_bma_128.c:            ^
bitslice_bma_128.c: 1 error generated.

Number of similar (implementation,compiler) pairs: 2, namely:
ImplementationCompiler
T:avx2clang -mcpu=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
T:sse2clang -mcpu=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)

Compiler output


bitslice_fft_256.c: bitslice_fft_256.c: In function 'bitslice_butterflies13_256':
bitslice_fft_256.c: bitslice_fft_256.c:99:23: warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi]
bitslice_fft_256.c:    99 |             out[j][i] = _mm256_set_epi64x(-v3, -v2, -v1, -v0);
bitslice_fft_256.c:       |             ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bitslice_fft_256.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:43,
bitslice_fft_256.c:                  from bitslice_fft_256.h:21,
bitslice_fft_256.c:                  from bitslice_fft_256.c:18:
bitslice_fft_256.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/avxintrin.h:1303:1: error: inlining failed in call to 'always_inline' '_mm256_set_epi64x': target specific option mismatch
bitslice_fft_256.c:  1303 | _mm256_set_epi64x (long long __A, long long __B, long long __C,
bitslice_fft_256.c:       | ^~~~~~~~~~~~~~~~~
bitslice_fft_256.c: bitslice_fft_256.c:99:25: note: called from here
bitslice_fft_256.c:    99 |             out[j][i] = _mm256_set_epi64x(-v3, -v2, -v1, -v0);
bitslice_fft_256.c:       |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bitslice_fft_256.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:47,
bitslice_fft_256.c:                  from bitslice_fft_256.h:21,
bitslice_fft_256.c:                  from bitslice_fft_256.c:18:
bitslice_fft_256.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/avx2intrin.h:1084:1: error: inlining failed in call to 'always_inline' '_mm256_permute2x128_si256': target specific option mismatch
bitslice_fft_256.c:  1084 | _mm256_permute2x128_si256 (__m256i __X, __m256i __Y, const int __M)
bitslice_fft_256.c:       | ^~~~~~~~~~~~~~~~~~~~~~~~~
bitslice_fft_256.c: bitslice_fft_256.c:115:20: note: called from here
bitslice_fft_256.c:   115 |             u[b] = _mm256_permute2x128_si256(t[0], t[1], 0x31);
bitslice_fft_256.c:       |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bitslice_fft_256.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:47,
bitslice_fft_256.c:                  from bitslice_fft_256.h:21,
bitslice_fft_256.c:                  from bitslice_fft_256.c:18:
bitslice_fft_256.c: ...

Number of similar (implementation,compiler) pairs: 4, namely:
ImplementationCompiler
T:avx2gcc -march=native -mtune=native -O2 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
T:avx2gcc -march=native -mtune=native -O3 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
T:avx2gcc -march=native -mtune=native -O -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
T:avx2gcc -march=native -mtune=native -Os -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)

Compiler output


nts_kem.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:39,
nts_kem.c:                  from ff.h:18,
nts_kem.c:                  from nts_kem.c:18:
nts_kem.c: nts_kem.c: In function 'create_matrix_G':
nts_kem.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/smmintrin.h:455:1: error: inlining failed in call to 'always_inline' '_mm_extract_epi64': target specific option mismatch
nts_kem.c:   455 | _mm_extract_epi64 (__m128i __X, const int __N)
nts_kem.c:       | ^~~~~~~~~~~~~~~~~
nts_kem.c: nts_kem.c:859:57: note: called from here
nts_kem.c:   859 |                                         v[i >> 6] |= (((_mm_extract_epi64(vh[l >> 7][j], 1) & (1ULL << (l & 63))) >> (l & 63)) << (i & 63));
nts_kem.c:       |                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nts_kem.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:39,
nts_kem.c:                  from ff.h:18,
nts_kem.c:                  from nts_kem.c:18:
nts_kem.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/smmintrin.h:455:1: error: inlining failed in call to 'always_inline' '_mm_extract_epi64': target specific option mismatch
nts_kem.c:   455 | _mm_extract_epi64 (__m128i __X, const int __N)
nts_kem.c:       | ^~~~~~~~~~~~~~~~~
nts_kem.c: nts_kem.c:862:57: note: called from here
nts_kem.c:   862 |                                         v[i >> 6] |= (((_mm_extract_epi64(vh[l >> 7][j], 0) & (1ULL << (l & 63))) >> (l & 63)) << (i & 63));
nts_kem.c:       |                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nts_kem.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:39,
nts_kem.c:                  from ff.h:18,
nts_kem.c:                  from nts_kem.c:18:
nts_kem.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/smmintrin.h:455:1: error: inlining failed in call to 'always_inline' '_mm_extract_epi64': target specific option mismatch
nts_kem.c:   455 | _mm_extract_epi64 (__m128i __X, const int __N)
nts_kem.c:       | ^~~~~~~~~~~~~~~~~
nts_kem.c: ...

Number of similar (implementation,compiler) pairs: 4, namely:
ImplementationCompiler
T:sse2gcc -march=native -mtune=native -O2 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
T:sse2gcc -march=native -mtune=native -O3 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
T:sse2gcc -march=native -mtune=native -O -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
T:sse2gcc -march=native -mtune=native -Os -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)