From: Vijay Marupudi <vijaymarupudi@gatech.edu>
To: guile-devel@gnu.org
Subject: Request to add *-resize! functions for contiguous mutable data structures.
Date: Fri, 6 Aug 2021 09:33:04 -0500 [thread overview]
Message-ID: <97e4262b-3ff9-1b21-35d8-45ad9d45ca99@gatech.edu> (raw)
Hello!
I was curious if Guile would be willing to provide a series of
new procedures for resizing contiguous memory regions.
(bytevector-resize! <bytevector> new-size [fill])
(vector-resize! <vector> new-size [fill])
The [fill] parameter could be used if the new-size is bigger than
the current size.
This would make writing imperative code easier and more
performant. I acknowledge that it is not idiomatic Scheme to use
mutable data structures, however this is useful to me for
dealing with large amounts of text data, in which I need random
access and flexible data storage. It would allow me to move off
my custom C extension vector and allow me to use other
vector-* functions.
Ideally, this would use libc's `realloc` to make the resize
quick, so that it can avoid data copying whenever possible.
Regards
Vijay Marupudi
PhD Student in Human Centered-Computing
Georgia Tech
next reply other threads:[~2021-08-06 14:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-06 14:33 Vijay Marupudi [this message]
2021-08-07 10:31 ` Request to add *-resize! functions for contiguous mutable data structures Taylan Kammer
2021-08-07 21:19 ` tomas
2021-08-08 12:17 ` Taylan Kammer
2021-08-07 11:09 ` Maxime Devos
2021-08-07 17:46 ` Taylan Kammer
2021-08-09 4:02 ` Vijay Marupudi
2021-08-09 18:24 ` Maxime Devos
2021-08-09 18:35 ` Vijay Marupudi
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=97e4262b-3ff9-1b21-35d8-45ad9d45ca99@gatech.edu \
--to=vijaymarupudi@gatech.edu \
--cc=guile-devel@gnu.org \
/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).