3 ms·
The deque collection was this efficient. Allocated blocks based on pagesize (4k). A truly beautiful data structure and one of the few good reasons to use stl.
by tfigment 7y ago
The deque collection was this efficient. Allocated blocks based on pagesize (4k). A truly beautiful data structure and one of the few good reasons to use stl.
- rwbt 7y agoOnly the libc implementation of std::deque allocates 4KiB blocks and lives upto it's performance and utility. The MSVC implementation is terrible (8 bytes) and even the GCC one isn't that efficient (512 bytes). Even though boost has a customizable deque block size, it's performance is still way behind Clang's libc.
- Something1234 7y agoWait why wouldn't std::deque allocate blocks as some multiple of the sizeof the thing it holds?