gcc profile guided optimization
DESCRIPTION
The use of gcc PGO - profile guided optimisation and other aspects of compiler optimisations, by Shachar Shemesh from Lingnu Open Source Consulting Ltd. http://www.lingnu.com. Presented at the Herzelinux Linux clubTRANSCRIPT
Profile Guided Optimizations
And other optimizations details Shachar Shemesh Lingnu Open Source Consulting Ltd.
http://lingnu.com
Credits and LicenseThis lecture is free to use under the Creative Commons Attribution Share Alike license (cc-bysa)Please give credit to Shachar Shemesh and a link to http://www.lingnu.com
All syntax highlighting curtsy of enscript.http://www.iki.fi/~mtr/genscript/
http://lingnu.com
An Apology to People at HomeThis lecture makes extensive use of "objdump" to view the compilation results' assembly code. There is no sane way to capture that short of taking videos. If you are reading the slides not during the lecture my apology.
http://lingnu.com
OptimizationOptimization minimizing or maximizing a certain program attribute (wikipedia)Run time, memory usage, power consumption etc.
A crucial part in allowing production of readable code.
http://lingnu.com
Platform Independent Optimizations
Optimizations that are independent of the platform the program is compiled for
http://lingnu.com
example1.1.cpp
One Program Unoptimized#include int main( int argc, char *argv[] ) { int i; double f; for( i=1; i