The trivial-jumptables Reference Manual

This is the trivial-jumptables Reference Manual, version 1.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 08 19:47:56 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 trivial-jumptables

Provides efficient O(1) jump tables on supported Common Lisp implementations and falls back to O(log(n)) on others. Important optimizations are performed even on unsupported implementations, notably "vectorization" which allows O(1) dispatch if all cases are constant.

Author

Jean-Philippe Paradis <>

License

Public Domain

Version

1.1

Source

trivial-jumptables.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 trivial-jumptables/trivial-jumptables.asd

Source

trivial-jumptables.asd.

Parent Component

trivial-jumptables (system).

ASDF Systems

trivial-jumptables.


3.1.2 trivial-jumptables/package.lisp

Source

trivial-jumptables.asd.

Parent Component

trivial-jumptables (system).

Packages

trivial-jumptables.


3.1.3 trivial-jumptables/vectorize.lisp

Dependency

package.lisp (file).

Source

trivial-jumptables.asd.

Parent Component

trivial-jumptables (system).

Public Interface
Internals

3.1.4 trivial-jumptables/optimize.lisp

Dependency

vectorize.lisp (file).

Source

trivial-jumptables.asd.

Parent Component

trivial-jumptables (system).

Public Interface
Internals

3.1.5 trivial-jumptables/expand.lisp

Dependency

optimize.lisp (file).

Source

trivial-jumptables.asd.

Parent Component

trivial-jumptables (system).

Public Interface
Internals

*%initial-ejumpcase-expander* (special variable).


4 Packages

Packages are listed by definition order.


4.1 trivial-jumptables

Source

package.lisp.

Nickname

jumpcase

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Special variables

Special Variable: *ejumpcase-expander*
Package

trivial-jumptables.

Source

expand.lisp.

Special Variable: *environment*
Package

trivial-jumptables.

Source

vectorize.lisp.

Special Variable: *precompute-constant-index*
Package

trivial-jumptables.

Source

optimize.lisp.

Special Variable: *preselect-case*
Package

trivial-jumptables.

Source

optimize.lisp.

Special Variable: *type-annotate-index-form*
Package

trivial-jumptables.

Source

expand.lisp.

Special Variable: *vectorization-threshold*
Package

trivial-jumptables.

Source

vectorize.lisp.

Special Variable: *vectorization-threshold-function*
Package

trivial-jumptables.

Source

vectorize.lisp.

Special Variable: *vectorize*
Package

trivial-jumptables.

Source

vectorize.lisp.


5.1.2 Macros

Macro: ejumpcase (index &body cases)
Package

trivial-jumptables.

Source

expand.lisp.


5.1.3 Ordinary functions

Function: expand-ejumpcase-linear (index-form cases case-count)
Package

trivial-jumptables.

Source

expand.lisp.

Function: expand-ejumpcase-logarithmic (index-form cases case-count)
Package

trivial-jumptables.

Source

expand.lisp.

Function: make-standard-optimizations-wrapper (ejumpcase-expander &key make-vectorizing-wrapper)
Package

trivial-jumptables.

Source

optimize.lisp.

Function: make-standard-vectorizing-wrapper (ejumpcase-expander &key threshold-function)
Package

trivial-jumptables.

Source

vectorize.lisp.

Function: maybe-type-annotate-index-form (index-form case-count)
Package

trivial-jumptables.

Source

expand.lisp.

Function: standard-vectorization-threshold (case-count)
Package

trivial-jumptables.

Source

vectorize.lisp.


5.1.4 Types

Type: index (case-count)
Package

trivial-jumptables.

Source

expand.lisp.


5.2 Internals


5.2.1 Special variables

Special Variable: *%initial-ejumpcase-expander*
Package

trivial-jumptables.

Source

expand.lisp.


5.2.2 Ordinary functions

Function: %call-threshold-function (threshold-function case-count)
Package

trivial-jumptables.

Source

vectorize.lisp.

Function: %fill-constantp-vector (constantp-vector cases threshold)
Package

trivial-jumptables.

Source

vectorize.lisp.

Function: %maybe-precompute-index (index-form)
Package

trivial-jumptables.

Source

optimize.lisp.

Function: %maybe-preselect-case-index (index-form case-count)
Package

trivial-jumptables.

Source

optimize.lisp.

Function: %partial-vectorize (ejumpcase-expander index-form cases constantp-vector)
Package

trivial-jumptables.

Source

vectorize.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   %  
E   F   M   S  
Index Entry  Section

%
%call-threshold-function: Private ordinary functions
%fill-constantp-vector: Private ordinary functions
%maybe-precompute-index: Private ordinary functions
%maybe-preselect-case-index: Private ordinary functions
%partial-vectorize: Private ordinary functions

E
ejumpcase: Public macros
expand-ejumpcase-linear: Public ordinary functions
expand-ejumpcase-logarithmic: Public ordinary functions

F
Function, %call-threshold-function: Private ordinary functions
Function, %fill-constantp-vector: Private ordinary functions
Function, %maybe-precompute-index: Private ordinary functions
Function, %maybe-preselect-case-index: Private ordinary functions
Function, %partial-vectorize: Private ordinary functions
Function, expand-ejumpcase-linear: Public ordinary functions
Function, expand-ejumpcase-logarithmic: Public ordinary functions
Function, make-standard-optimizations-wrapper: Public ordinary functions
Function, make-standard-vectorizing-wrapper: Public ordinary functions
Function, maybe-type-annotate-index-form: Public ordinary functions
Function, standard-vectorization-threshold: Public ordinary functions

M
Macro, ejumpcase: Public macros
make-standard-optimizations-wrapper: Public ordinary functions
make-standard-vectorizing-wrapper: Public ordinary functions
maybe-type-annotate-index-form: Public ordinary functions

S
standard-vectorization-threshold: Public ordinary functions