News for hackers. Stuff that matters.
Re:In C++, is empty() faster than comparing the size with zero? by secondcoming on Thursday October 28, 2021 @06:52PM (#29033066)
And so you get an optimal, but broken, program. This helps nobody.
Re:In C++, is empty() faster than comparing the size with zero? by ehvatum on Thursday October 28, 2021 @07:03PM (#29033182)
It helps everyone whose input does not cause undefined behavior.
Re:In C++, is empty() faster than comparing the size with zero? by leetcrew on Thursday October 28, 2021 @08:56PM (#29034021)
in most cases a program that invokes undefined behavior is already broken; it's just a question of how catastrophic the failure will be.