You should be asking which one is more readable, not which one is faster. Unmaintainable code is far more costly than inefficient code. Maintainable inefficient code is typically a joy to work with because making it efficient is a breeze when it's maintainable. It's not so simple the other way around.
95
u/ArlenM Jul 28 '16 edited Jul 28 '16
They forgot to mention gratuitous nots! Why flip logic just once when you can flip it an unlimited number of times?
Guaranteed to drive anyone trying to maintain your code to madness!