News for hackers. Stuff that matters.
Re:In C++, is empty() faster than comparing the size with zero? by spatulon on Thursday October 28, 2021 @04:12PM (#29031275)
Is the LLVM optimisation pass that does this hyper-specialised for this one particular trick, and, if so, is it valuable in practice?

Here's an example where (I think) the two functions are equivalent, so I'm a little disappointed it couldn't make the same optimisation on the second one. (At least it still optimised the tail call to a jump.)

https://godbolt.org/z/K9rMajsjK

Re:In C++, is empty() faster than comparing the size with zero? by Someone on Thursday October 28, 2021 @05:14PM (#29032090)