PATCH: first pass of wrapup_global_declarations performance improvements

Mark Mitchell mark@codesourcery.com
Tue Feb 18 16:29:00 GMT 2003



--On Friday, February 14, 2003 01:08:22 PM -0800 Matt Austern 
<austern@apple.com> wrote:

> This patch does two things.
>
> First, it changes an unconditional write into a conditional write.  This
> is because, empirically, the unconditional write dirties pages
> unnecessarily.  This is a noticeable performance problem, especially when
> using PCH.

This is OK, thanks.

You should probably also add a note to the coding standards page (wherever 
that is; I've forgotten) to advocate using a conditional in situations like 
that, if we really think that's likely to be a win in many places.  Or else 
a comment in this one, indicating that.

(It occurs to me that this is actually a job for profile-directed feedback; 
if I'm setting these bits to the same value they already have 99% of the 
time, it's probably a good idea to insert an additional read, and leave out 
the write.)

-- 
Mark Mitchell                mark@codesourcery.com
CodeSourcery, LLC            http://www.codesourcery.com



More information about the Gcc-patches mailing list