VariablePackage: compilerToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version

trust-table-case-argument-switch

As with most compiler switch variables, the value of this variable can be t, nil, or a function object that accepts five arguments and returns t or nil. The arguments passed to the function will be the values of the safety, space, speed, debug, and compilation-speed 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-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version