-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<deque>: Needs a major performance overhaul #147
Comments
The current block size is tragically small: For more than two int32 values or for a single int64 the deque degenerates to a vector of pointers. Thus for all practical purposes, on MSVC deque IS a vector of pointers, which defeats its purpose of reducing allocator load and memory fragmentation. https://github.com/microsoft/STL/blob/main/stl/inc/deque#L561 while GCC 4.6.3 allocates blocks of 512 bytes:
https://gcc.gnu.org/onlinedocs/gcc-4.6.3/libstdc++/api/a01049_source.html boost::deque uses a similar logic and block size as the glibc implementation above. |
its purpose of reducing allocator load and memory fragmentation. microsoft/STL#147 (comment) Slic3r::deque<> compiles to boost::container::deque<> on Windows, to std::deque<> on other systems. SeamPlacer newly uses Slic3r::deque<>.
its purpose of reducing allocator load and memory fragmentation. microsoft/STL#147 (comment) Slic3r::deque<> compiles to boost::container::deque<> on Windows, to std::deque<> on other systems. SeamPlacer newly uses Slic3r::deque<>.
its purpose of reducing allocator load and memory fragmentation. microsoft/STL#147 (comment) Slic3r::deque<> compiles to boost::container::deque<> on Windows, to std::deque<> on other systems. SeamPlacer newly uses Slic3r::deque<>.
its purpose of reducing allocator load and memory fragmentation. microsoft/STL#147 (comment) Slic3r::deque<> compiles to boost::container::deque<> on Windows, to std::deque<> on other systems. SeamPlacer newly uses Slic3r::deque<>.
Currently, both checked and unchecked iterators of MSVC STL's |
The tiny block size of MSVC's implementation is just utterly baffling. |
deque
has long-standing performance problems, including but not limited to its choice of a very small block size. Unlike all other containers,deque::iterator
always uses the proxy object, further adding to its complexity. When we can break binary compatibility in the vNext release, we need to eliminate deque's proxy (as we've already done for all other containers in debug mode, exceptvector<bool>
), retune the block size, and generally rethinkdeque
from scratch.Also tracked by Microsoft-internal VSO-102760 / AB#102760.
vNext note: Resolving this issue will require breaking binary compatibility. We won't be able to accept pull requests for this issue until the vNext branch is available. See #169 for more information.
The text was updated successfully, but these errors were encountered: