Suppose I have a lookup table of small size (say 256 byte elements, i.e. uint8_t ltable[size]), and a byte array (uint8_t *array). I want to change each byte of array to the value in corresponding element of lookup table, i.e.
Code:
uint8_t *p;
for (p = array; p < array + array_size; p ++)
*p = ltable [*p];
but in asm using mmx/sse/sse2 so that I could perform many lookups in the same time (instead of byte-granularity of the above C sample). Is it possible?