Profile Guided Optimisation
Josef Weidendorfer
kde-optimize@mail.kde.org
Thu, 27 Feb 2003 15:26:43 +0100
On Thursday 27 February 2003 11:51, Stefan Heimers wrote:
> I just read the following in a slashdot discussion:
>
> by norton_I (64015)
> "Basically, you compile with -fprofile-arcs, run the executable enough
> to generate sufficient data, then compile with -fbranch-probabilities.
> This will try to order basic blocks so that the CPU predicts branches
> correctly most often."
>
> Did anybody try if it works? How much does it help? Can it be done with
> complex projects like KDE?
To be honest, I never tried.
Surely it can avoid wrong branch predictions of the processor.
I just don't know how to
- make this work with libraries
- integrate it in a automatic build process.
Imagine:
After 1st compilation, the build process will start all compiled applications,
opening typical data (e.g. konqueror browses automatically 500 selected
sites). Then all of kdelibs and konqueror is rebuild.
Would this be acceptable? No.
Perhaps a typical set of profiling-data could be delivered with KDE sources
and used in the build process.
Josef
PS: valgrind uses exactly this mechanism to improve speed: But it uses
information gathered in the same run.
>
>
> Stefan
> _______________________________________________
> Kde-optimize mailing list
> Kde-optimize@mail.kde.org
> http://mail.kde.org/mailman/listinfo/kde-optimize