More Array Accessors
Currently there is a set of array-of-n
and array-row-of-n
for 2
, 3
, and 4
. The first selects the first n
items of an array and the second selects the first n
items of an array row. These are all located in array.lisp.
There should also be an Perhaps these could be combined into the existing accessors if there is no performance loss in SBCL when starting at 0.array-range-of-n
that behaves like array-of-n
, but adds a starting point, which almost turns 1D arrays into 2D ones. array-row-range-of-n
would also be a good idea.
Update as of 2020-09-06: An alternative to introducing new accessors would be to add an &optional
offset to the accessors. This is a simpler solution and might be preferable, but only if it doesn't impact the performance in SBCL when inlined.
Update as of 2021-01-07: The first half has been implemented (retrieving with an optional offset) and all that remains is the second half (setting with an optional offset). The optional offset of 0 doesn't seem to hurt performance in SBCL because it is an inline function for the reader and a macro for the writer.
with-2D-array-accessors
also needs to be updated to support the offset feature.