This is a question for my curiosity.
Lets say i wanted to perform an action (Action a) if a particular variable was equal to a value of x and perform another action (action b) otherwise. I could do this 2 ways
If var = x then
if var != x
my common sense would tell me the first is quicker but computers have been known to do things i don't understand for optimisation reasons. Which one is quicker?