Author: steve-myers
Subject: GETMAIN / FREEMAIN versus STORAGE OBTAIN / STORAGE RELEASE
Posted: Wed Feb 01, 2017 1:45 am (GMT 5.5)
Over in the CICS forum that mentions the use of the GETMAIN and FREEMAIN macros and then goes on to claim the STORAGE macros are faster. This is a lie.
the following program produced these messages -
STORAGE REQUIRED 10% MORE CPU TIME THAN GETMAIN/FREEMAIN
GETMTIME = 6.540824, STORTIME = 7.228047
The program was run under Hercules, not real hardware. It would be interesting to run it on a regular z/ Arcitecture machine, though I doubt anyone will bother.
Subject: GETMAIN / FREEMAIN versus STORAGE OBTAIN / STORAGE RELEASE
Posted: Wed Feb 01, 2017 1:45 am (GMT 5.5)
Over in the CICS forum that mentions the use of the GETMAIN and FREEMAIN macros and then goes on to claim the STORAGE macros are faster. This is a lie.
the following program produced these messages -
STORAGE REQUIRED 10% MORE CPU TIME THAN GETMAIN/FREEMAIN
GETMTIME = 6.540824, STORTIME = 7.228047
Code: |
GETMTEST CSECT USING *,12 SAVE (14,12),,* LR 12,15 LA 15,SAVEAREA ST 13,4(,15) ST 15,8(,13) LR 13,15 TIMEUSED STORADR=GETMSTRT,CPU=MIC,LINKAGE=SYSTEM L 2,=A(64*1024) LA 3,128 GETMLOOP GETMAIN RU,LV=(3) MVC 0(4,1),GETMHDR ST 1,GETMHDR BCT 2,GETMLOOP FREELOOP ICM 1,B'1111',GETMHDR BZ GETTIME MVC GETMHDR,0(1) FREEMAIN RU,LV=(3),A=(1) B FREELOOP GETTIME TIMEUSED STORADR=GETMEND,CPU=MIC,LINKAGE=SYSTEM L 2,=A(64*1024) OBTGET STORAGE OBTAIN,LENGTH=(3) MVC 0(4,1),GETMHDR ST 1,GETMHDR BCT 2,OBTGET OBTFREE ICM 1,B'1111',GETMHDR BZ OBTTIME MVC GETMHDR,0(1) STORAGE RELEASE,LENGTH=(3),ADDR=(1) B OBTFREE OBTTIME TIMEUSED STORADR=OBTEND,CPU=MIC,LINKAGE=SYSTEM LG 1,GETMEND SG 1,GETMSTRT STG 1,GETMTIME LG 0,OBTEND SG 0,STORSTRT STG 0,STORTIME SGR 1,0 SR 0,0 M 0,=F'100' D 0,GETMTIME+4 ST 1,PERCENT CVD 1,DWORK ED PCT,DWORK+6 L 1,GETMTIME+4 CVD 1,DWORK * 3 4 5 6 7 * NNNNNNNNN ED GETMD,DWORK+3 L 1,STORTIME+4 CVD 1,DWORK ED STORD,DWORK+3 OPEN (PRINT,OUTPUT) PUT PRINT,MSG PUT PRINT,MSG2 CLOSE PRINT L 13,4(,13) RETURN (14,12),RC=0 SAVEAREA DC 9D'0' GETMSTRT DC FD'0' GETMEND DC 0FD'0' STORSTRT DC FD'0' OBTEND DC FD'0' GETMTIME DC FD'0' STORTIME DC FD'0' DWORK DC PL8'0' PERCENT DC F'0' GETMHDR DC A(*-*) PRINT DCB DSORG=PS,MACRF=PM,DDNAME=SYSPRINT,RECFM=VBA,LRECL=126 DC 0D'0' LTORG , MSG DC AL2(MSGL,0),C' STORAGE REQUIRED' PCT DC 0C' NNN',C' ',X'202120',C'% MORE CPU TIME THAN GETMAIN/F> REEMAIN' MSGL EQU *-MSG MSG2 DC AL2(MSG2L,0),C' GETMTIME =' GETMD DC 0C' NNN.NNNNNN',C' ',X'202120',C'.',6X'20',C', ' DC C'STORTIME =' STORD DC 0C' NNN.NNNNNN',C' ',X'202120',C'.',6X'20' MSG2L EQU *-MSG2 END GETMTEST |