Function Entry: CLAL-OPTIMIZE

← Prev | ↑ Chapter | Next → | Index | Symbols

Function Entry: CLAL-OPTIMIZE

Name

clal-optimize

Class

clautolisp Extension Function

Syntax

(clal-optimize qualities)

Arguments and Values

  • qualities — a proper list; each element is a bare quality symbol (DEBUG / SPACE / SPEED, meaning level 3) or a list (SYMBOL LEVEL) with LEVEL an integer 0..3.

Description

Set the optimization qualities (debugger public interface, Part A). Unmentioned qualities keep their current level.

The levels take effect as described under clal-optimization: the instrumented fork is kept while DEBUG >= SPACE, the non-instrumented fork is compiled from SPEED 1, the instrumented fork from SPEED 2, and SPEED 3 compiles eagerly at definition.

SPEED was pinned at 0 in releases before 2.0.8, when there was no compiler for it to reach; it is now honoured.

Return Values

The new qualities as ((DEBUG n) (SPACE n) (SPEED n)).

Side Effects

Updates the process-wide optimization alist, the runtime instrumentation-enabled flag and the runtime compilation level.

Affected By

  • The previous clal-optimize setting (unmentioned qualities are preserved).

Exceptional Situations

Signals :bad-argument on an element that is neither a quality symbol nor (SYMBOL LEVEL), on an unknown quality name, or on a level outside 0..3. Signals from require-proper-list when qualities is not a proper list.

Examples

(clal-optimize '((debug 0) space))
=> ((DEBUG 0) (SPACE 3) (SPEED 2))

;; run everything compiled, and compile it at load time
(clal-optimize '((speed 3)))
=> ((DEBUG 0) (SPACE 3) (SPEED 3))

Availability

  • clautolisp: documented (this entry); implemented since an earlier clautolisp release.
  • AutoCAD: NOT present.
  • BricsCAD: NOT present.

Source Notes

  • clautolisp-only extension; see the debugger-public-interface issue (Part A).