unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: "Thompson, David" <dthompson2@worcester.edu>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guile-devel <guile-devel@gnu.org>, Andy Wingo <wingo@pobox.com>
Subject: Re: [PATCH] Add 'bytevector-slice'.
Date: Wed, 11 Jan 2023 10:21:31 -0500	[thread overview]
Message-ID: <CAJ=RwfaGmXZBBfc-HQkWe8Vj9R8dJPypQRiavKTOCGN8z+KQqg@mail.gmail.com> (raw)
In-Reply-To: <20230111150015.10219-1-ludo@gnu.org>

Hi Ludovic,

On Wed, Jan 11, 2023 at 10:00 AM Ludovic Courtès <ludo@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



  reply	other threads:[~2023-01-11 15:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-11 15:00 [PATCH] Add 'bytevector-slice' Ludovic Courtès
2023-01-11 15:21 ` Thompson, David [this message]
2023-01-11 15:29 ` Jean Abou Samra
2023-01-11 17:34   ` Ludovic Courtès
2023-01-11 17:37     ` [EXT] " Thompson, David
2023-01-11 19:05       ` [EXT] " lloda
2023-01-12 22:27         ` Ludovic Courtès
2023-01-13  9:30           ` lloda
2023-01-11 17:39 ` The mysterious ‘SCM_F_BYTEVECTOR_CONTIGUOUS’ Ludovic Courtès
2023-01-11 18:51   ` lloda
2023-01-11 19:00     ` lloda
2023-01-12  0:10 ` [PATCH] Add 'bytevector-slice' Maxime Devos
2023-01-13 11:32   ` Ludovic Courtès
2023-01-13 11:56     ` Maxime Devos
2023-01-13 23:48       ` Ludovic Courtès
2023-01-14 14:45         ` Maxime Devos
2023-01-14 15:19   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJ=RwfaGmXZBBfc-HQkWe8Vj9R8dJPypQRiavKTOCGN8z+KQqg@mail.gmail.com' \
    --to=dthompson2@worcester.edu \
    --cc=guile-devel@gnu.org \
    --cc=ludo@gnu.org \
    --cc=wingo@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).