Updated patch for std::list: Performance and memory usage improvements.

Gawain Bolton gbolton@free.fr
Tue Jul 8 20:49:00 GMT 2003


Gabriel Dos Reis wrote:

>Gawain Bolton <gbolton@free.fr> writes:
>
>| Gabriel Dos Reis wrote:
>| 
>| >Gawain Bolton <gbolton@free.fr> writes:
>| >
>| >| Once again this is an updated patch (see attached), this time for
>| >| std::list.  The original patch was posted a while back:
>| > | |     http://gcc.gnu.org/ml/libstdc++/2003-02/msg00179.html
>| > | | Here's the suggested change log entry:
>| > | | 2003-07-05  Gawain Bolton  <gp.bolton@computer.org>
>| > | |     * include/bits/stl_list.h: Performance and memory usage
>| >|       improvements.
>| >|     * include/bits/list.tcc: Likewise.
>| >
>| >
>| >Please, could you  name the functions/classes/data you're touching in
>| >your patches?  The above entry isn't really helpful :-(
>| >
>| The patch changed the std::list class.  The main change is to the
>| behaviour of the constructor and destructor as the list header node is
>| no longer dynamically allocated/de-allocated.
>
>Those need to be mentioned in the ChangeLog entry -- that helps when
>doing archeology.  See the reste of the  ChangeLog file.
>
>| This improves
>| performance and saves memory.
>| 
>| >
>| >Do you have any measurements regarding your improvements?
>| >
>| >
>| Yes, using the attached performance test program here are some numbers
>| tested on i686-pc-linux-gnu.
>
>Thanks, those pieces of information worth mentioning when sending the
>patch -- the patch looks like more uglication and one might wonder
>whether the obfuscation buys us anything.
>  
>
Uglification?  Obfuscation?  You must be referring to the 
std::list::swap() function.  I agre that it is not very pretty, but 
there is no question it buys us something.  I'm sure you'll agree that 
using less CPU time as well as less memory is a good thing.

Cheers,


Gawain

-- 
Gawain Bolton
Coignieres, France
PGP Info: Key server: http://wwwkeys.pgp.net
          Key id: 6EBEDEA6
          Fingerprint: 65C0 0030 21D1 7A01 546A  E7DB D60F 47E0 6EBE DEA6




More information about the Libstdc++ mailing list