This is the mail archive of the
mailing list for the GCC project.
Re: PATCH: minor C++ front end compile speed improvement
On Dec 1, 2004, at 11:45 AM, Matt Austern wrote:
On Dec 1, 2004, at 10:12 AM, Mark Mitchell wrote:
Matt Austern wrote:
I'm seeing a bit under 0.5% improvement in QT builds from this.
(Again: close to the limits of accuracy of my measurements, so take
that number with a grain of salt.) We avoid a test and a
dereference in namespace_binding when we're looking things up in the
global namespace, since we know the global namespace can't be an
OK to commit to mainline?
Zack pointed me at this. Yes, this is OK. I'm amazed it helps that
much, but profiling is always amazing. Add a comment, please,
explaining why it is safe to do this. (Not why it's a performance
win; just why it makes sense.)
And quite possible that the real gain is less than .5%. See note
above about salt.
I am also wondering about the .5% gain.
Effectively this patch replaces one branch with another. The net gain
is not use of
what is inside body of the macro for global namespace, which doesn't
seem that complicated. But if
this sort of optimization is promising, then there could be more
similar opportunities elsewhere.