[sdiy] Pointers in C
Olivier Gillet
ol.gillet at gmail.com
Sat Dec 31 15:55:35 CET 2011
> I'm currently using a shift/mask approach and it's taking up valuable clock cycles.
Have you checked the generated code? There are many places in the
Shruthi-1 code where I do things like:
uint8_t result = (a_16_bits_word >> 8) & 0xff;
And gcc is always smart enough to compile this into a direct byte /
register transfer ; not the shift and mask. Even better, when
a_16_bits_word is the result of a complex sequence of operations, gcc
removes dead code that has no influence on the MSByte.
Olivier
More information about the Synth-diy
mailing list