Re:In C++, is empty() faster than comparing the size with zero?
by ycombobreaker on Thursday October 28, 2021 @08:02PM
(#29033645)
This niche is exactly why I've used std::list in several cases. It allows fairly easy preallocation of list nodes.
Fortunately, the single-node splice is still fast. But batch allocations, say related to some scatter/gather operations, would still be hit by this change.
Fortunately, the single-node splice is still fast. But batch allocations, say related to some scatter/gather operations, would still be hit by this change.