
10 Oct
2011
10 Oct
'11
9:54 a.m.
Thorsten Ottosen wrote:
I was trying to optimize some of our performance critical code. Step one is to find the bottlenecks with some tool. I used the one that comes with visual C++.
After running this, I had a great overview over which functions took up most of the time, and which functions that were called a lot (say, many million times). Usually, the compiler will not inline a large function because the saved time is neglible and more code is generated. However, the compiler can usually not know that a large function often returns quickly where large parts of the code of the function is only used sometimes.
Hence I used __force_inline.
Did you also try profile-driven optimisation? Regards, Phil.