l...@gnu.org (Ludovic Courtès) writes: > Hello!
Hi! > Stringbufs and bytevectors are now always "inlined" in the BDW-GC > branch [0, 1], which means that there's no cell->buffer indirection, > which greatly simplifies code (it also takes less room and may slightly > improve performance). > > The `scm_take_' functions for strings/symbols/bytevectors are now > essentially aliases to the corresponding `scm_from_' because we cannot > advantageously reuse the provided storage. That seems a bit of a shame. (i.e. that we can't advantageously keep the caller's string or vector data) Did you consider the option of - always having an indirection from the stringbuf/bytevector object to the underlying data - optimizing the scm_from_... case by doing a single scm_gc_malloc_pointerless (), and making the "underlying data pointer" point into the same malloc'd block. The first point should allow a similar simplification of the code as you have in your commits - by not having to handle both the inline and indirected cases everywhere - but the indirection would allow us to keep meaningful scm_take_... functions. Neil