ARITH
- Default
- ARITH(COMPAT)
- Recommended
- Use ARITH(EXTEND) only if the larger maximum number of digits enabled by this option is required (31 instead of 18). Otherwise, use ARITH(COMPAT) as it can result in better performance in some cases.
- Reasoning
In addition to allowing larger variables to be declared, ARITH(EXTEND) also raises the maximum number of digits maintained for intermediate results.
These larger intermediate results sometimes require different, slower code to be generated. Inline calculations may need to be replaced with more expensive runtime library routines.
For example, the comp-1 floating point exponentiation:
IsCOMPUTE C = A ** B
63%
faster when using ARITH(COMPAT) compared to ARITH(EXTEND).