I removed the family of methods related to truncate. The one I will implement in
the future that will kick in at GC time will look different.

I also changed parts of RegExp to support sliced strings without the need to
truncate them first. This took longer than I thought.

Other than that, I'm basically still on the same page, features to come:
 - taking externalized parent strings into account (same content, different
encoding).
 - generated code for substring allocation.
 - GC time truncation.

So far the dromaeo string benchmark scores 639us as opposed to 867us without
slices. The biggest item of performance improvement is unsurprisingly the slice
function, scoring 2123us instead of 83260us. There is still room for more
improvement though.


http://codereview.chromium.org/7477045/diff/19020/src/heap.cc
File src/heap.cc (right):

http://codereview.chromium.org/7477045/diff/19020/src/heap.cc#newcode2698
src/heap.cc:2698: ASSERT(sliced_string->parent()->IsSeqString());
Actually a flat cons with external first can't exist since flat cons are
only created by SlowTryFlatten, which creates a new SeqString by
WriteToFlat. On the other hand, if you externalize a flat cons, it is
morphed into an external string.

On 2011/08/05 12:14:14, Vitaly Repeshko wrote:
I think we can have flat cons with external first. It will pass the
IsExternalString check above but will hit this assert.

http://codereview.chromium.org/7477045/

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

Reply via email to