[RFC] Vector (string?) growth factor of 1.5 (insted of 2)
Paolo Carlini
pcarlini@suse.de
Mon Feb 2 16:48:00 GMT 2004
Dhruv Matani wrote:
> Have you tried for vector<pod> and vector<with_non_trivial_copy_ctor>?
> such as std::string? How much is the difference for bot approaches with
> 2 and 1.5 as the growth factor? Does the performance improve as the size
> of the vector increases or does it deprove? What about memory
> fragmentation using the specialized libstdc++-v3 allocators? Are there
> any redundant copies made with using the specialized allocators?
For now, I'm just reading attentitevely the whole discussion (to which
you participated, I think!)
> Linux glibc calls mmap for large requests.
This is a suggestion that I find particularly interesting. Was also put
forward in the thread by James Kanze. Consider that we plan to have some
infrastructure for mmap anyway, since we want to use it when possible in
iostreams.
> Do you think that this can be worked out with Gabriel Dos Reis in
> conjunction with the plan for allowing reallocation of memory for
> vectors?
Dunno...
Paolo.
More information about the Libstdc++
mailing list