The handwritten kernel for the __AVX512F__ path uses the intrinsic _mm512_mask_compressstoreu_pd which maps to the instruction VPCOMPRESSPD. For Zen 4, that instruction is microcode and slower than the scaler path.
|
#ifdef __AVX512F__ |
|
if constexpr (std::is_same_v<PT, double>) { |
|
for (size_t i {0}; i < config::VECTOR_SIZE; i = i + 8) { |
|
__m512d l = _mm512_loadu_pd(ENCODED_VALUE_ARR + i); |
|
__m512d r = _mm512_loadu_pd(VALUE_ARR_WITHOUT_SPECIALS + i); |
|
__m512i index = _mm512_loadu_pd(DOUBLE_INDEX_ARR + i); |
|
auto is_exception = _mm512_cmpneq_pd_mask(l, r); |
|
_mm512_mask_compressstoreu_pd(TMP_INDEX_ARR + exceptions_idx, is_exception, index); |
|
exceptions_idx += LOOKUP_TABLE[is_exception]; |
|
} |
|
} else { |
The handwritten kernel for the
__AVX512F__path uses the intrinsic_mm512_mask_compressstoreu_pdwhich maps to the instructionVPCOMPRESSPD. For Zen 4, that instruction is microcode and slower than the scaler path.ALP/include/alp/encoder.hpp
Lines 351 to 361 in 31ca0ed