SSRANGE
- Default
- NOSSRANGE
- Recommended
- For best performance, NOSSRANGE is recommended. Specifying SSRANGE will cause extra code to be generated to detect out of range storage references.
- Reasoning
The extra checks enabled by SSRANGE can cause significant performance degradations for programs with index, subscript and reference modification expressions in performance sensitive areas of your program. If only a few places in your program require the extra range checking, then it might be faster to code your own checks instead of using SSRANGE which will enable checks for all cases.
Note that in V6, there is no longer a runtime option to disable the compiled-in checks. So specifying SSRANGE will always result in the range checking code to be used at runtime. A benchmark that makes moderate use of subscripted references to tables slows down by 18% when SSRANGE is specified.
There is no performance difference between SSRANGE(ZLEN) and SSRANGE(NOZLEN).
Considerations
In addition to the runtime performance impact, use of SSRANGE can also significantly increase compilation time.