Optimization for Intel Atom platforms when developing for MeeGo apps
-
-march=atom -O3 -flto -mfpmath=sse -ffast-math
The last flag, -ffast-math, will significantly speed up your mathematical operations especially in loops but it
may also cause your results to lose precisions.
We also recommend that if you have a lot of sub-functions that you try to apply "inline" preceding those functions with about 10 lines of code or less.
Example such as:
-
inline int max(int a, int b) {
return a > b ? a : b;
}
In Intel Atom* CPU architecture, it is making an assumption that return address that is pushed into the call stack isn't going to be be popped (returned from the sub function) for at least a short while. If sub function returns too soon, Atom* CPU will actually impose additional cost to the whole operation. Applying "inline" to short functions will help to mitigate this situation. However, we recommend that you apply "inline" sparingly. Inlining functions will increase memory footprint during runtime. Inlining short functions will reduce the cost that Atom imposes without increasing too much memory footprint. As rule of thumb, we recommend applying "inline" only to functions with roughly 10 lines of code or less.
We also recommend that you try to use float datatypes instead doubles datatypes. Loading and storing doubles will utilize extra memory bandwidth. Speed improvement from using float instead of doubles is very minimal but the saved memory bandwidth is then made available for other processes. This will improve overall system performance.
A short reminder that Intel Atom* CPU is hyperthreaded. On single core Atom system, you will see two processors available. We strongly encourage that you try to implement multithreading in your application.