This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: first pass of wrapup_global_declarations performance improvements
- From: Matt Austern <austern at apple dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 18 Feb 2003 10:31:45 -0800
- Subject: Re: PATCH: first pass of wrapup_global_declarations performance improvements
On Tuesday, February 18, 2003, at 08:25 AM, Mark Mitchell wrote:
--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.
I think I'd rather put in a comment, for the time being. I don't know
how often this sort of thing is a good idea: it turned out to be
important here, because it was going over every global declaration and
many of them are (if you're using pch) in pages that are mmapped in
from disk. Here's my comment:
/* We're not deferring this any longer. Assignment is
conditional to avoid needlessly dirtying PCH pages. */
--Matt