Have you ever made own time measurements, or are you just repeating the urban myth of any substantial speed improvement of Boolean expressions over IF statements?dr.geek wrote:with a bit of planning, almost all IF statements can be replaced with (multiple) boolean statements.
eg.
if x = 1 then p=p+1
if x = 2 then p=p-1
can be achieved with
p=p+(x=2)-(x=1)
much faster....


More compact? Yes, probably. *Much* faster? No.
Here, the Boolean expression is slightly faster (just 29 jiffies per 1000 evaluations!). With more complex expressions, the Boolean expression is likely to become slower than multiple-line IF statements, as the comparisons have all to be evaluated anyway, but the IF version only needs to execute one single THEN statement, whereas the Boolean expression needs to evaluate all subexpressions in full:

