This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: throw(), pure and const flags on functions


Jan Hubicka wrote:

>> Jan, I'd also love to see performance figures about how much this helps.
>>  As always with optimizations, I'd like more quantitative data.  Here,
>> it's not so important since there's no downside I can see, but it would
>> still be fun to know that this actually does something valuable. :-)
> 
> Those few nothrow on RB trees saves about half of all EH control flow of
> tramp3d, that is about 12000 EH edges. No runtime difference since all
> the EH happens outside hot spots, but the EH code accounts over 20% of
> tramp3d binary, so savings are noticeable too.

20% code size savings are very noticeable; that's a great justification.

> I wonder if some kind of stuff like
> mozilla or something similar can serve as good benchmark of code that
> actually does some nontrivial EH.

I don't have a great example either.  You're right that anyone writing
performance-critical C++ is going to work hard to avoid EH in inner
loops, so I would suspect that a lot of the win is indeed going to be
code size.  I don't know enough about the Mozilla code-base to know if
it's a good example of EH, or not.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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