3 ms·
std::dequeue is useless from a practical/portability perspective. MSVC allocates items in 16 byte chunks (as in, one allocation per item if sizeof(T) > 8). Thi
by MauranKilom 5y ago
std::dequeue is useless from a practical/portability perspective.
MSVC allocates items in 16 byte chunks (as in, one allocation per item if sizeof(T) > 8). This will not change due to binary compatibility.
From a theoretical perspective I agree with you though - having chunked allocations is going to be significantly better, and using iterators instead of raw pointers you can also avoid any trouble that might result from non-contiguity (e.g. trying to subtract two pointers - it will work just fine using the iterators).
- beached_whale 5y agolibc++ uses 4kb