Hi Alex,
I think we can use shifting here to eliminate a few multiplies... yes?
Line 1765:
rcOptions = (rcData[AUX1]<1300) + (1300<rcData[AUX1] && rcData[AUX1]<1700)*2 + (rcData[AUX1]>1700)*4
+(rcData[AUX2]<1300)*8 + (1300<rcData[AUX2] && rcData[AUX2]<1700)*16 + (rcData[AUX2]>1700)*32;
Alex: code optimization
Re: Alex: code optimization
GCC do this automatically.
- guru_florida
- Posts: 45
- Joined: Sat Mar 26, 2011 4:51 am
Re: Alex: code optimization
Really, cool! I didnt know it had that optimization. I assume then that arduino compiles with full -O.
Re: Alex: code optimization
Arduino (sigh) compile with -Os (for size), but you can modify it to compile with -O2