Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can I ask why you choose to implement your own queue when many exist within C++? (e.g. using queue<T> or list<T>)


Memory 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: