All correct, good stuff Tobriand
Floating point operations are done in software (no dedicated hardware) so are very slow.
Fixed point math is a method of using an integer (32 bits) and setting a portion as the part before the decimal point, and a portion as the part after the decimal point (the fraction). Usually the split is 16 bits each, for 16.16 fixed point.
If you use this type of math, the range of your number is limited (16 bits rather than 32 bits) to around -32768 to 32767, and you lose a bit of accuracy in the decimal portion too. For example (this is just made up), the number 7.0067 might not be able to be represented exactly by a fixed point number, and is stored as 7.0065. This means that a few multiplications and other operations later, your final solution may be out by a bit.
A lookup table is a pre-calculated table of results. For example, sine - it can be a table of all the values of sin between 0 and 359 degrees. Then when you need to calculate sin(200) you just look it up in the table instead for a massive speed increase. If you need a value
between 200 and 201 you look up both sin(200) and sin(201) and interpolate between them to get an approx answer. This uses some math, but is usually much less of a hit than calculating the value directly.
Shifts can be used for multiplying and dividing by factors of 2 (so multi/divide by 2,4, 8, 16 etc) by shifting the number left or right one bit for each factor of 2. As tobriand said - can only be done for fixed point. Example:
num>>1; // divide by 2
num<<1; // multiply by 2
num>>2; // divide by 4
num<
; // multiply by 8
Shifts are very fast an inexpensive. Infact, in most instances they are FREE. Because ARM has whats calleda barrel shifter that can shift the number as well as doing another operation. For example (a+2)>>2 - the processor will do an ADD instruction and then shift the result at the same time for free
.
Something like that anyway.