Hi Ludovic, On Wed, Jan 11, 2023 at 10:00 AM Ludovic Courtès <l...@gnu.org> wrote: > > +@node Bytevector Slices > +@subsubsection Bytevector Slices > + > +@cindex subset, of a bytevector > +@cindex slice, of a bytevector > +@cindex slice, of a uniform vector > +As an extension to the R6RS specification, the @code{(rnrs bytevectors > +gnu)} module provides the @code{bytevector-slice} procedure, which > +returns a bytevector aliasing part of an existing bytevector. > + > +@deffn {Scheme Procedure} bytevector-slice @var{bv} @var{offset} [@var{size}] > +@deffnx {C Function} scm_bytevector_slice (@var{bv}, @var{offset}, > @var{size}) > +Return the slice of @var{bv} starting at @var{offset} and counting > +@var{size} bytes. When @var{size} is omitted, the slice covers all > +of @var{bv} starting from @var{offset}. The returned slice shares > +storage with @var{bv}: changes to the slice are visible in @var{bv} > +and vice-versa.
Just wanted to chime in to say that this is a really great new feature! Bytevector slices will be very useful for performance sensitive code that could benefit from using a pre-allocated memory arena. Really really great stuff! Thank you! - Dave