3 ms·
// 1. lookup and build output word at the same time const uint32_t dword = lookup32[0][input[i + 0]] | lookup32[0][input[i + 1]]
by nothrabannosir 11y ago
// 1. lookup and build output word at the same time
const uint32_t dword = lookup32[0][input[i + 0]]
| lookup32[0][input[i + 1]]
| lookup32[0][input[i + 2]]
| lookup32[0][input[i + 3]];
// 2. save 32 bits
reinterpret_cast<uint32_t*>(out) = dword;
out += 3;
Do you mean lookup32[0]... | lookup32[1] ... | ..[2] | [3], instead?
- wmu 11y agoIndeed my mistake, thanks for pointing it out. Being own proofreader is not an easy job. :)
- nothrabannosir 11y agoNice article, thank you for sharing. Great intro to SSE :)