Sunday, 11 August 2013

COBOL NUMPROC Compiler Option.

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 20%  faster to equivalent.
On the average, NUMPROC(PFD) was 1% faster than NUMPROC(MIG), with a range of 9% faster  to equivalent.
On the average, NUMPROC(MIG) was equivalent to NUMPROC(NOPFD), with a range of 13% faster to equivalent.

Created with Artisteer

No comments:

Post a Comment