Makes a vector that can be accessed efficiently.
system
make-typed-aref-vector byte-length &key allocation => vector
byte-length⇩ |
A non-negative fixnum. |
allocation⇩ |
vector⇩ |
A vector. |
The function make-typed-aref-vector
returns a vector which is suitable for efficient access at compiler optimization level safety = 0.
byte-length is measured in 8-bit bytes.
allocation gives you control of where the new vector is allocated. It is interpreted the same way as in make-array.
Use typed-aref to access vector efficiently.
Declaring the result of make-typed-aref-vector
as cl:dynamic-extent causes it to allocate the array on the stack (in LispWorks 7.0 and later versions).
To make a typed vector of the type (unsigned-byte 32)
or single-float with length 10:
(make-typed-aref-vector (* 10 4))
To make a typed vector of the type double-float with length 10:
(make-typed-aref-vector (* 10 8))
typed-aref
28.2 Optimized integer arithmetic and integer vector access
LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:31:02