Leo Razoumov <email@example.com> wrote:
| SCM primitive (vector-set-length! ...) proved itself to be very useful.
| This is precisely why I am missing it so much in MzScheme.
| Concering the cost of an additional pointer redirection it is certainly less
| than the cost of copying the contents of an old string into the newly
| allocated one. Savings due to realloc(...) compared to malloc(...) can
| be significant if you have enough non-fragmented free memory.
But this can also work *against* you if you have a really high-performance
copying collector, where copying small-to-medium-sized in-line strings is
*cheaper*, because it trivially allows you to compact memory.
| I think that SCM uniform vectors is a *great* optimization idea worth
| while to become a SFRI and being included in other implementations.
But as I said, they can be quite *non*-optimal with some garbage collector
styles. Adjustable vectors & strings, if you have them at all, should be
optional (and *NOT* mandated by any SRFI as the default).
Rob Warnock, 8L-846 firstname.lastname@example.org
Applied Networking http://reality.sgi.com/rpw3/
Silicon Graphics, Inc. Phone: 650-933-1673
1600 Amphitheatre Pkwy. FAX: 650-933-0511
Mountain View, CA 94043 PP-ASEL-IA