What’s the best approach when data structures are being built from scratch? or How do you optimize pe

22 Replies, 893 Views

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.

Messages In This Thread



Users browsing this thread: 1 Guest(s)