Append short strings by copying in string builder
This CL changes IncrementalStringBuilder to write short strings directly to {current_part_} instead of shortening {current_part}, allocating a new part and concatenate everything using ConsString. This optimization requires the IncrementalStringBuilder to either use two byte encoding, or the incoming string is flat with one byte representation. This CL improves stack trace serialization micro benchmarks up to 10%. Bug: v8:8742 Change-Id: I5cc8339be8035c42438381883544d108591fb945 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1647696 Commit-Queue: Simon Zünd <szuend@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#62075}
Showing
Please
register
or
sign in
to comment