Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: