8 ms·
Can I ask why you choose to implement your own queue when many exist within C++? (e.g. using queue<T> or list<T>)
by IIlllIllIIIIlII 10y ago
Can I ask why you choose to implement your own queue when many exist within C++? (e.g. using queue<T> or list<T>)
- alexhultman 10y agoMemory footprint and performance. This implementation is way, way more lightweight. And it assumes that the buffer being queued has a struct Message in its head, so it doesn't have to allocate a node - one memory allocation is therefore skipped.