Conditional expressions
Comparing small data items to constants
Statement: conditional expressions
Data types: DISPLAY, COMP-3
Options: OPT(1 | 2)
Conditions: The data item has 8 or fewer digits if zoned, or 15 or fewer digits if packed.
V4 behavior: Using in-memory instructions, modifies the sign code of the data item to a known value, then compares to a constant.
V6 behavior: Loads the value of the data item into a register, then modifies the sign code and performs the comparison in a register. This is a new optimization in V6.
Source
Example:
01 A PIC 9(4).
If A = 0 THEN
...
Performance: This depends
on the architecture level. On zEC12, V6 is 60% faster than V4. On z13® and z14, V6 is up to 91% faster
than V4.