My immediate thought would be the same: If we have a word to spare in the
String
structure, we might as well let it point directly to the real character data
instead of pointing to an intermediate buffer.
It might require tweaking of GC, since it would be a native pointer, but so
is
the resource pointer, so it should be doable.
We were considering adding such a pointer recently, but the overhead of
adding
an extra pointer to all external strings seemed steep. It's a good idea to
only
do it to some strings.
http://codereview.chromium.org/8568013/
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev