3 Optimizing Lisp Programs
3.5 Development mode optimizations
In development mode, which is the default mode, the Compiler performs only the following optimizations on the compiled code:- It obeys
special
,notinline
,arglist
, andignore
declarations. - It obeys
inline
proclamations. - It obeys
safety
optimization proclamations. - It performs tail call optimization if you request it by setting the
speed
optimization level to 3 or by setting the:tail-merge
keyword argument to for the functionscompile
,compile-file
, orcompiler-options
. - It uses
defsubst
anddef-compiler-macro
definitions.
All other optimizations described in this chapter are ignored. In particular, the Compiler does not perform the following optimizations:- It does not replace generic operations with type-specific operations. Thus, type declarations are ignored.
- It does not perform constant folding on constant numerical expressions. Thus, the Compiler does not perform constant folding on the following expressions:
(+ 1 2)
(* 2.0 pi)
(aref \#(a b c) 1)
(car '(a b))
- It does not show optimization reports.
When you want to use these optimizations, you must select the production mode of the Compiler.
The Advanced User's Guide - 9 SEP 1996 Generated with Harlequin WebMaker