This is the mail archive of the gcc@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: Suggestion for improving C++ parser memory usage


On Dec 30, 2004 02:18 PM, Robert Dewar <dewar@adacore.com> wrote:

> Significant memory reductions are certainly of interest, but it seems
> very dubious that this particular suggestion would pay off,

Hellooooo!!!  Have you learned nothing from observing the past few
years of GCC development?  Maybe just this one idea doesn't pay off
by itself, but in the bigger picture it could make a difference.
Your kind of thinking, and one many (all?) of us could be "accused"
of, is what turned GCC into a resource hog.  We are always hunting
the big fish, and we ignore the smaller ones.

Do you know how much 1.01**10 is?  More than 10%.  So 10 slowdowns
of an insignificant 1% make your compiler 10% slower.  Similarly,
do you know how much 0.995**10 is?  10 Patches to reduce memory by
an "insignificant" 0.5% give you a 5% smaller memory foot print.

So yes, 0.5-1.0% changes *do* matter.  Everyone on this list should
think about this and realize this, the next time a small improvement
or degradation is noticed and dismissed as "insignificant".  First
observe the numbers and the patch, then decide if it is worth it or
not.

> and it also
> seems that it would murkify the parser for no appreciable gain.

Now, perhaps *you* should show data points for this because your
claim is just as unfounded as the one your disputing ;-)

Roger proposes to look ahead a single token.  Well, big deal, C++
reads ahead *all* tokens anyway.  The token is right there for you
to look at.

I think Roger should try first, and then make the trade-off.

Gr.
Steven



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