News for hackers. Stuff that matters.
Re:In C++, is empty() faster than comparing the size with zero? by glandium on Thursday October 28, 2021 @06:26PM (#29032832)
I thought the conventional wisdom was to avoid the STL if you need consistent performance across platforms, because they all have different pitfalls. Things might be different with libc++, now, though, since you can use it in most cases.
Re:In C++, is empty() faster than comparing the size with zero? by loup-vaillant on Thursday October 28, 2021 @07:58PM (#29033614)
My point exactly: I can trust the STL’s standardised interface, but performance is often dependent on implementation details, which are bound to vary from platform to platform, or even from computer to computer (assuming a dynamically linked libc++).