Conclusion
MySQL was optimized by using a set of compiler optimizations above and beyond the default -O2 optimization. By applying the process of characterizing the application, prioritizing compiler optimization experiments, selecting a representative benchmark, and measuring performance results, it is possible to improve the performance of applications by taking advantage of higher levels of compiler optimization. This improvement does not require going to the depths of traditional performance analysis, but yields performance benefits nonetheless. Relying on aggressive compiler optimization is a practical first-cut technique for improving the performance of your application; if further performance gains are desired, the next step of low-level performance analysis should be considered.
Questions to Consider | |
Question | If the Answer is Yes |
Is the application large or does the working data set exceed the size of the cache? | The application may be sensitive to cache optimizations. |
Are there large amounts of numerical or floating-point calculations? | Vectorization may help performance. |
Does the source code make heavy use of classes, methods, and/or templates? | C++ code usually benefits from inlining. |
Is the execution spread throughout the code in many small sections? | Code size optimizations may be beneficial. |
Is the data access random, localized, or streaming? | Data access optimizations may be beneficial. |