Does the first If statement have to do extra work to convert the "var == 1" into a boolean true false? In other words, does the 2nd if statement skip a step and get treated automatically as a boolean, or is there absolutely no difference in the logic?Code:int var = 1; if(var == 1) { } if(var) { }
is there any speed advantage?