Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
Posted: Thu Sep 03, 2009 11:25 am Post subject:
jctgf,
Quote:
I was told that declaring the "S" makes the program faster. Is it true?
It depends on the compiler option NUMPROC. Check this
Quote:
Using the NUMPROC(PFD) compiler option generates significantly more efficient code for numeric comparisons. It also avoids the generation of extra code that NUMPROC(NOPFD) or NUMPROC(MIG) generates for most references to COMP-3 and DISPLAY numeric data items to ensure a correct sign is being used. With NUMPROC(NOPFD), sign fix-up processing is done for all references to these numeric data items. With NUMPROC(MIG), sign fix-up processing is done only for receiving fields (and not for sending fields) of arithmetic and MOVE statements. With NUMPROC(PFD), the compiler assumes that the data has the correct sign and bypasses this sign fix-up processing. NUMPROC(MIG) generates code that is similar to that of OS/VS COBOL. Using NUMPROC(NOPFD) or NUMPROC(MIG) may also inhibit some other types of optimization. However, not all external data files contain the proper sign for COMP-3 or DISPLAY signed numeric data, and hence, using NUMPROC(PFD) may not be applicable for all application programs. For performance sensitive applications, NUMPROC(PFD) is recommended when possible.
Performance considerations using NUMPROC:
On the average, NUMPROC(PFD) was 1% faster than NUMPROC(NOPFD), with a range of 12% faster to equivalent.
On the average, NUMPROC(PFD) was 1% faster than NUMPROC(MIG), with a range of 8% faster to equivalent.
On the average, NUMPROC(MIG) was equivalent to NUMPROC(NOPFD), with a range of 11% faster to equivalent.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum