You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Perf][C++] SIMD bit-unpack kernels run as portable fallbacks in default builds; add runtime AVX2 dispatch #1073
ENABLE_SIMD only defines -DENABLE_SIMD. The library targets the portable x86-64 baseline (SSE2) and never compiles with -mavx2/-mssse3, so simde's AVX2/SSSE3 intrinsics (vpgatherqq, vpshufb, ...) compile to simde's portable fallback.
Micro-benchmark of the RLE bit-unpack (same header, only difference is -mavx2):
width 14: 99 → 644 M values/s (6.5×)
width 20: 99 → 612 M values/s (6.2×)
So the SIMD paths added in #823 / #898 (PLAIN, GORILLA, TS_2DIFF) and the RLE packers were not running real AVX2 in shipped builds.
Proposed changes
Add common/simd_dispatch.h with cpu_has_avx2() (__builtin_cpu_supports("avx2"), GCC/Clang on x86 only).
Add __attribute__((target("avx2"))) intrinsic twins of the bit-unpack kernels, dispatched at runtime; keep the simde path as the portable fallback.
Implemented for RLE and TS_2DIFF in #1072. PLAIN / GORILLA kernels can follow the same pattern.
Activity