I would like use the parameter OPTIONS(INLINE).
But i don't see the difference.
Here is the source code that I use to test the option INLINE.
Code:
TEST:PROC OPTIONS(MAIN);
DCL SYSPRINT FILE STREAM OUTPUT PRINT;
DCL I FIXED BIN(31) INIT(0);
DCL E FIXED BIN(31) INIT(0);
DCL F FIXED BIN(31) INIT(0);
DCL C CHAR(250) INIT('');
DCL C_1 CHAR(1) BASED(PTRADD(ADDR(C),E-1));
DO I=1 TO 10_000;
C='';
DO F=1 TO 250;
CALL TEST1;
END;
END;
TEST1:PROC REORDER OPTIONS(INLINE);
DO E=250 TO 1 BY -1 WHILE(C_1='');
END;
E=E+1;
C_1='A';
END TEST1;
END TEST;
This test consumes CPU 0MIN 01.74SEC
The same code without option INLINE generates the same
assembler code and gives the same result.
I was expecting to have the same result as if the code of procedure TEST1 was in place of CALL.
Code:
TEST:PROC OPTIONS(MAIN);
DCL SYSPRINT FILE STREAM OUTPUT PRINT;
DCL I FIXED BIN(31) INIT(0);
DCL E FIXED BIN(31) INIT(0);
DCL F FIXED BIN(31) INIT(0);
DCL C CHAR(250) INIT('');
DCL C_1 CHAR(1) BASED(PTRADD(ADDR(C),E-1));
DO I=1 TO 10_000;
C='';
DO F=1 TO 250;
DO E=250 TO 1 BY -1 WHILE(C_1='');
END;
E=E+1;
C_1='A';
END;
END;
END TEST;
This test consumes CPU 0MIN 01.69SEC
is what I used wrong or not understood the option INLINE?