I have a benchmark program that compares two implementations of the C sprintf() function, that seems pretty similar to what you are doing here. The code for this test is hundreds of times more complex than your benchmarking utility. I also have a utility called testregex which compares different implementations of C regexp functions, the program to do this is several KBs in size. But anyway just to disprove your argument, how many times do you use if (1 == 1) in your scripts? I never have. More likely is if (%var == 1) or if (%var == %var2) or if ($someident(%var,para2,para3) != $null). Those are realworld examples, what you have proven has no relevance, because no one would ever use if (1 == 1) in a script, it always evaluates to true, there is NEVER a reason to use that. For the moment I won't dispute the fact that if (1 == 1) has results similar to what your benchmark shows, but my question is so what? If you use if (1 == 1) in your script then you are correct in saying which method is best, but does that tell me which of these:
if ($mid($1-,%i,1) == $chr(%d) || %i > 5) { haltdef }
if $mid($1-,%i,1) == $chr(%d) || %i > 5 { haltdef }
if $mid($1-,%i,1) == $chr(%d) || %i > 5 haltdef
is faster? It certainly does not, because your benchmark makes no attempt to test complex and realworld examples, it provides a test of if (1 == 1) which will never be used by anyone. Therefore it makes the results of your test irrelevant since they only apply to a fictitious scenario.