News for hackers. Stuff that matters.
Re:In C++, is empty() faster than comparing the size with zero? by MauranKilom on Thursday October 28, 2021 @05:37PM (#29032368)
No, because you can splice in the middle. Given just the iterators you simply have no other way than counting.

(The reason why it used to be constant time is that it didn't have to count because it didn't have to compute the new size).

There are no comments on this comment yet.