Created on Nov. 29, 2023, 1:52 p.m. - by Hans, Van Battel
In batch-processing of big datasets every speed-up is important, so Is there any difference in the execution-speed between:
IF a = b
continue
ELSE
MOVE b to a
END-IF
and:
IF a <> b
MOVE b to a
END-IF
While they appear inocuous, the first form (a=b) will have to generate several NOP (no operation) instructions and then a MOVE.
Some people are very much against using a "not ="...which is the COBOL expression, not the SQL "<>", but in any case the compiler generates extra instructions for the first form that are not required for the second. Stick with the NOT EQUAL.