[Patch] Performance and memory usage improvements for stl_tree.h

Benjamin Kosnik bkoz@redhat.com
Thu Feb 27 18:49:00 GMT 2003


>>If a C-style cast produced different object code than the static_cast<>,
>>that probably indicates an error.  We like static_cast<> because it's
>>easier to find with grep, and ugly enough that you try to avoid a need
>>to do it at all.

Exactly. 

>So here is yet another patch using static_cast<> for the new code.  The 
>existing code could be cleaned up in several ways, such as using 
>static_cast<> elsewhere rather than C style casts.  I have tried to 
>refrain from doing this to keep the purppose of this patch focused.  I 
>am also trying to figure out how to contribute improvements to libstdc++ 
>and  so want to start with something simple.

Well, this is a good start, thanks.

We need something to add as a performance metric for this kind of
change. What did you do tests with? How are you measuring the
performance improvement?

-benjamin



More information about the Libstdc++ mailing list