This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: first pass of wrapup_global_declarations performanceimprovements




--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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]