[Liboil] another copy_u8 for the pot

Adam D. Moss adam at gimp.org
Wed Nov 16 03:45:17 PST 2005

A minor variation on copy_u8_ints, of course, but rather
faster here...

static void
copy_u8_llints (uint8_t *dest, uint8_t *src, int n)
   int i;
     *dest++ = *src++;
   n >>= 3;
     *(uint64_t *)dest = *(uint64_t *)src;
     dest += 8;
     src += 8;
OIL_DEFINE_IMPL (copy_u8_llints, copy_u8);

One concern is that both of these routines potentially
cause unaligned accesses, which are fatal on some archs
and incredibly slow on others (safe and merely slightly
slower on x86).

Adam D. Moss   -   adam at gimp.org

More information about the Liboil mailing list