2 ms·
Nice post! A small tip, broadcasting from memory is often free. For lookup tables like that I typically define a global variable like that: static const __
by Const-me 2y ago
Nice post!
A small tip, broadcasting from memory is often free. For lookup tables like that I typically define a global variable like that:
static const __m128i g_lookup = _mm_setr_epi8( ... );
And then in the function, before the main loop, I use `_mm256_broadcastsi128_si256` to load + broadcast the 16-byte vector in 1 instruction.