[webkit-dev] Making empty vectors smaller; eliminate String::adopt(Vector)?
rniwa at webkit.org
Wed Dec 7 21:00:27 PST 2011
On Wed, Dec 7, 2011 at 10:10 AM, Darin Adler <darin at apple.com> wrote:
> For vectors with no inline capacity, we can store the capacity inside the
> Vector’s buffer. That way, the Vector itself will be one size_t smaller
> when empty. In fact, with a bit of performance risk, we can do the same
> thing with the vector’s size, making an empty Vector just a single pointer.
> But doing this also means that the allocated buffer won’t have the vector
> elements at the start of the memory block. The only thing I could find that
> this would interfere with would be the String::adopt(Vector) function. My
> question is whether with the latest wonderful StringBuilder technology we
> could eliminate String::adopt(Vector). Can we get rid of that entirely from
I support this change and I think we can make this change.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev