| (quality value
quality—an optimize quality.
value—one of the integers
declaration or proclamation
Advises the compiler that each quality should be given attention according to the specified corresponding value. Each quality must be a symbol naming an optimize quality; the names and meanings of the standard optimize qualities are shown in the next figure.
Figure 3.25: Optimize qualities
There may be other, implementation-defined optimize qualities.
0 means that the corresponding quality is totally
3 that the quality is extremely important;
2 are intermediate values, with
3) can be abbreviated to quality.
Note that code which has the optimization
is called safe code.
The consequences are unspecified if a quality appears more than once with different values.
(defun often-used-subroutine (x y) (declare (optimize (safety 2))) (error-check x y) (hairy-setup x) (do ((i 0 (+ i 1)) (z x (cdr z))) ((null z)) ;; This inner loop really needs to burn. (declare (optimize speed)) (declare (fixnum i)) ))
declare, declaim, proclaim, Section 3.3.4 (Declaration Scope)
optimize declaration never applies to either a variable or
a function binding. An
optimize declaration can only
be a free declaration. For more information, see Section 3.3.4 (Declaration Scope).