Quote:
|
Originally Posted by steven114
Don't worry about it until you run into problems.
|

This is definately NOT a good engineering principle. One of the many unwritten laws of engineering failure is that the problem will occur in the most inopportune time. What if professionals did this? What if automotive guys said that there's a problem with the brake system, but we'll take care of it when the problem shows up. What if the communications guys said that there's a problem in making phone calls when the system is under load, but we'll wait until the problem shows up during the Super Bowl to fix it?
The point is that if you know that something will cause a problem in the future, design your system in such a way that you never get yourself into that situation.
Quote:
|
Preemptive optimization almost always goes to waste, as the chip is so fast that you (usually, there are exceptions) can't feed it data fast enough to use all its processing power.
|
Wanna bet. If you get enough code running in your loop you can easilly get the RC to miss packets. Trust me, we've been there.
Quote:
|
If a variable is best stored as a float, use one. If it's an integer, use one of those.
|
This might be the case in a non-embedded environment, but in a case that you have limited resources, you don't want to go around wasting valuable cycles doing float calculations if you can get away with integer math. For each float operation that you do you probably add a dozen or more assembly instructions.
Also floats take up more program space, which is definately a valueable commodity.