Erik Corry wrote:

When you do += in V8 you create a ConsString, which is a tree node
that takes up 20 bytes on 32 bit or 32 bytes on 64 bit.  This is a
relatively fast operation.  The first time you use the string for
things other than consing up results it is converted into a flat
string in much the same way as join would do it.

Well now THAT is really cool.

I don't actually know what is faster.  Benchmarks are probably in
order if anyone has time.

Agreed; intuition about performance is often wrong.

Best,
- Joe


--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to