3.1 Introduction to the Compiler

3.1.1 Selecting compilation modes

The Compiler has two compilation modes: one that emphasizes speed and one that emphasizes efficient code. In development mode, the Compiler compiles code quickly and retains a high degree of safety but performs few optimizations on the compiled code. This is the default mode for the Compiler. In production mode, the Compiler compiles code more slowly but produces very efficient code. You can alternate between the two modes by changing the optimization setting of the Compiler. Within production mode, you can also vary the amount of error checking, or safety, retained in the compiled code.

You can select a compilation mode by using anoptimize proclamation. The following proclamation selects the production mode of the Compiler:

(proclaim '(optimize (compilation-speed 0) (safety 1) (speed 3)))
You can change back to development mode by using the following proclamation:

(proclaim '(optimize (compilation-speed 3) (safety 3) (speed 2)))
The Compiler tells you which mode it is in the first time you invoke the Compiler after changing modes. You can also show the current compilation mode by using the functionreport-compiler-options.

See Section 3.2.8 on page 40 for more information about optimization settings.

The Advanced User's Guide - 9 SEP 1996

Generated with Harlequin WebMaker