This is the mail archive of the 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: Suggested improvement to std::list

In article <> Gawain Bolton writes:

> I would like to humbly suggest an improvement to the std::list container
> class.  This improvement does the following:
>   * reduces amount of memory required
>        o the _List_alloc_base class contains a _List_node_base member
>          rather than using _List_node<_Tp>.
>   * improve performance when creating and destroying lists
>        o the constructor no longer allocates memory, since the _M_node
>          member in  the _List_alloc_base class is not a pointer.
>        o this offers a big improvement when creating temporary list
>          objects

Sweet.  Based on your analysis of retaining O(1), this is probably an
OK change to make in principle.  Gawain, do you/Nortel have an
assignment for GCC on file with the FSF?

Could you create a test case that demonstrates an actual performance
improvement?  We like to have those for proposed performance patches
(I hold myself to that standard and would like that information before
I consider it for approval).

Next, since this change hits a file included in application code, we
would need to consider when to apply it.


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