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

Reply via email to