Pro tip: Don’t optimize prematurely. Build it dumb first, then measure.
That said, if resizing is murdering perf, try a chunked allocator—allocate in fixed-size blocks instead of one big blob.
C++ folks: std::deque does this under the hood. Magic.
That said, if resizing is murdering perf, try a chunked allocator—allocate in fixed-size blocks instead of one big blob.
C++ folks: std::deque does this under the hood. Magic.
