
INLINE
- Default
- INLINE
- Recommended
- INLINE
- Reasoning
-
When the INLINE option is specified, the compiler may choose to replace the PERFORM of a paragraph or section with a copy of that paragraph or section's code. By inserting that code at the location of the PERFORM, the compiler saves the overhead of branching logic to and from the procedure. Inlining also allows the compiler to perform further optimizations on the inlined code. For example, a data item used inside the inlined code may have a known constant value at that PERFORM, allowing the compiler to simplify expressions.
When NOINLINE is specified, the compiler will not create any inlined duplicate code.
- Considerations
-
The >>INLINE OFF and >>INLINE ON directives enable more fine-grained control over inlining. This can help reduce program size and improve instruction cache performance in cases where PERFORMs are rarely executed (for example, in error handling code).
