Mon, 4 Dec 2000 04:15:28 -0800, Simon Marlow <simonmar@microsoft.com> pisze:
Ok, so the malloc/free is the most expensive part. I'm moderately surprised:) Perhaps we could do a better job, but we'll never do better than ByteArrays as long as the bracket is required.
BTW, withCString in my implementation which handles charsets does not use alloca but malloc. It's because we don't know the length of the resulting char[] until we convert it, so we cannot preallocate it. We must guess an initial size and realloc the array as needed. Hence unfortunately speeding up alloca won't speed my implementation of the common need of allocating C objects. -- __("< Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.ids.net.pl/ \__/ ^^ SYGNATURA ZASTÊPCZA QRCZAK