On 10/26/2011 5:09 PM, Tim Wescott wrote:
> This compiles:
>
> ((adc_ping_pong) ? osc_vector : gyro_vector)[fill_vector][fill_ix] =
> raw_data;
>
> I have every confidence that it would work as intended in lieu of
>
> if (adc_ping_pong)
> {
> osc_vector[fill_vector][fill_ix] = raw_data;
> }
> else
> {
> gyro_vector[fill_vector][fill_ix] = raw_data;
> }
>
> Ewww.
>
Hey, don't knock it. On a RISC machine, that difference might save you
two, maybe even three instructions.
--
Rob Gaddi, Highland Technology --
www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.