683cf6f43b
In the early days of Chrome when we used WebKit there was no support for ASCII strings on the C++ side, so we put a hint onto these two-byte strings that said "string only contains one byte data", such that internally in V8 when these were involved in string operations, we could instead create the *cheaper* one byte strings. Nowadays Blink properly supports one-byte string representations and this additional hint only comes with overhead, since we check it in quite a few places (i.e. on the hot path for string concatenation), plus we end up consuming more memory due to the additional string maps. Removing the hint also frees one bit in the InstanceType zoo for strings. This alone improves performance on the `bench-dom-serialize.js` test case by around **3%**. Tbr: mstarzinger@chromium.org Bug: v8:6622, v8:8834, v8:8939 Cq-Include-Trybots: luci.chromium.try:linux-blink-rel Change-Id: I0753f2859cee7b5a37b6f0da64d8ec39fcb044ff Doc: https://bit.ly/fast-string-concatenation-in-javascript Reviewed-on: https://chromium-review.googlesource.com/c/1498478 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#60006} |
||
---|---|---|
.. | ||
libplatform | ||
APIDesign.md | ||
DEPS | ||
OWNERS | ||
v8-inspector-protocol.h | ||
v8-inspector.h | ||
v8-internal.h | ||
v8-platform.h | ||
v8-profiler.h | ||
v8-testing.h | ||
v8-util.h | ||
v8-value-serializer-version.h | ||
v8-version-string.h | ||
v8-version.h | ||
v8-wasm-trap-handler-posix.h | ||
v8-wasm-trap-handler-win.h | ||
v8.h | ||
v8config.h |