Optimization of std::deque implementation

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Optimization of std::deque implementation

François Dumont-2
Here is a patch similar to what has been done to other containers like
std::vector.

It optimizes the swap operation, the allocator extended move constructor
and some other methods where I just bypass intermediate calls.

I reproduced the noexcept qualification on _Deque_impl_data/_Deque_impl
even if they are not necessary as long as the std:deque always allocate
on instantiation.

I also removed some _M_map checks as, once again, it can't be null for
the moment. I just kept the one in the destructor as I'd like to commit
a patch after this one to avoid allocations on move which will make this
check necessary.

Tested under Linux x86_64 Default and C++98 modes, w/o version namespace.

Still time to commit ?

François


deque.patch (15K) Download Attachment