Daniel Lemire personal blog

In C++, is empty() faster than comparing the size with zero?

Most C++ programmers rely on "STL" for their data structures. The most popular data structure is probably vector, which is just a dynamic array. The set and the map are other useful ones. The STL data structures are a minimalist design. You have relatively few methods. All of them allow you to compute the size ……
Points
123
HN comments
81
Submissions
1
Cited by
0 commenters

Software Engineering2021

On Hacker News

SubmittedTitle on HNPointsComments
Oct 27, 2021In C++, is empty() faster than comparing the size with zero? by ibobev12381

More from Daniel Lemire

All 87 posts →

Related posts from the same era