VariablePackage: compilerToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
Unrevised from 8.0 to 8.1.
8.0 version

trust-table-case-argument-switch

As with all compiler switch variables, the value of this variable can be t, nil, or a function object that accepts four arguments and returns t or nil. The arguments passed to the function will be the values of the safety, space, speed, and debug optimization qualities, in that order. nil is equivalent to a function that always returns nil and t to a function that always returns t. When the value is a function and we say t (or true) or nil (or false) in the text below, we mean that the function returns, respectively, t or nil.

This switch modifies the behavior of a case macro form which would be compiled in a table-driven fashion. Normally all values are checked, including ranges and types, and although the method of testing is very efficient, it contributes to the overhead of the case form. When trust-table-case-argument-switch returns true, and when the type of the test value is limited to what is acceptable by a table-driven case statement (see ;Itab labels in compiler-explanations.htm), then the overhead of testing for this type and range is removed, and the case form gets more efficient.

This optimization is not implemented in all architectures (the value is ignored on architectures where it is not implemented). It is implemented at least on x86 and amd64 based versions of Allegro CL, and may be implemented on others as needed.

This declaration may cause erros when variables are not of the type declared and these errors may cause incorrect results rather than actual errors. Like all speed 3/safety 0 switches, this one whould be used with care.

See compiling.htm for information on the compiler.


Copyright (c) 1998-2009, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 8.1. This page was not revised from the 8.0 page.
Created 2009.9.3.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
Unrevised from 8.0 to 8.1.
8.0 version