Previous Page | Next Page

SAS System Options

CMPOPT= System Option



Specifies the type of code generation optimizations to use in the SAS language compiler.
Valid in: configuration file, SAS invocation, OPTIONS statement, System Options window
Category: System administration: Performance
PROC OPTIONS GROUP= PERFORMANCE

Syntax
Syntax Description
Details
Examples

Syntax

CMPOPT=optimization-value | (optimization-value-1 ... optimization-value-n) | "optimization-value-1 ... optimization-value-n"| ALL | NONE
NOCMPOPT


Syntax Description

optimization

specifies the type of optimization that the SAS compiler is to use. Valid values are

EXTRAMATH | NOEXTRAMATH

specifies to keep or remove mathematical operations that do not affect the outcome of a statement. When you specify EXTRAMATH, the compiler retains the extra mathematical operations. When you specify NOEXTRAMATH, the extra mathematical operations are removed.

FUNCDIFFERENCING | NOFUNCDIFFERENCING

specifies whether analytic derivatives are computed for user defined functions. When you specify NOFUNCDIFFERENCING, analytic derivatives are computed for user defined functions. When you specify FUNCDIFFERENCING, numeric differencing is used to calculate derivatives for user defined functions. The default is NOFUNCDIFFERENCING.

GUARDCHECK | NOGUARDCHECK

specifies whether to check for array boundary problems. When you specify GUARDCHECK, the compiler checks for array boundary problems. When you specify NOGUARDCHECK, the compiler does not check for array boundary problems.

Interaction: NOGUARDCHECK is set when CMPOPT is set to ALL and when CMPOPT is set to NONE.
MISSCHECK | NOMISSCHECK

specifies whether to check for missing values in the data. If the data contains a significant amount of missing data, then you can optimize the compilation by specifying MISSCHECK. If the data rarely contains missing values, then you can optimize the compilation by specifying NOMISSCHECK.

PRECISE | NOPRECISE

specifies to handle exceptions at an operation boundary or at a statement boundary. When you specify PRECISE, exceptions are handled at the operation boundary. When you specify NOPRECISE, exceptions are handled at the statement boundary.

Tip: EXTRAMATH, MISSCHECK, PRECISE, GUARDCHECK, and FUNCDIFFERENCING can be specified in any combination when you specify one or more values.
ALL

specifies that the compiler is to optimize the machine language code by using the (NOEXTRAMATH NOMISSCHECK NOPRECISE NOGUARDCHECK NOFUNCDIFFERENCING) optimization values. This is the default.

Restriction: ALL cannot be specified in combination with any other values.
NONE

specifies that the compiler is not set to optimize the machine language code by using the (EXTRAMATH MISSCHECK PRECISE NOGUARDCHECK FUNCDIFFERENCING) optimization values.

Restriction: NONE cannot be specified in combination with any other values.
NOCMPOPT

specifies to set the value of CMPOPT to ALL. The compiler is to optimize the machine language code by using the (NOEXTRAMATH NOMISSCHECK NOPRECISE NOGUARDCHECK NOFUNCDIFFERENCING) optimization values.

Restriction: NOCMPOPT cannot be specified in combination with values for the CMPOPT option.

Details

SAS procedures that perform non-linear statistical modeling or optimization use a SAS language compiler subsystem that compiles and executes your SAS programs. The compiler subsystem generates machine language code for the computer on which SAS is running. By specifying values with the CMPOPT option, the machine language code can be optimized for efficient execution. The SAS procedures that use the SAS language compiler are CALIS, COMPILE, GENMOD, MODEL, PHREG, NLIN, NLMIXED, NLP, and RISK.

To specify multiple optimization values, the values must be enclosed in either parentheses, single quotation marks, or double quotation marks. When CMPOPT is set to multiple values, the parentheses or quotation marks are retained as part of the value. They are not retained as part of the value when CMPOPT is set to a single value.

If a value is entered more than once, then the last setting is used. For example, if you specify CMPOPT=(PRECISE NOEXTRAMATH NOPRECISE), then the values that are set are NOEXTRAMATH and NOPRECISE. All leading, trailing, and embedded blanks are removed.

When you specify EXTRAMATH or NOEXTRAMATH, some of the mathematical operations that are either included or excluded in the machine language code are

x * 1 x * -1
x ÷ 1 x ÷ -1
x + 0 x - 0
x - x x ÷ x
- -x any operation on two literal constants


Examples

OPTIONS Statement Result
options cmpopt=(extramath); extramath
options cmpopt="extramath missscheck precise"; "precise extramath extramath"
options nocmpopt; (noextramath nomisscheck noprecise noguardcheck nofuncdifferencing)

Previous Page | Next Page | Top of Page