• Benedikt Meurer's avatar
    [cleanup] Remove obsolete "one byte data hint" for strings. · 683cf6f4
    Benedikt Meurer authored
    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: 's avatarYang Guo <yangguo@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#60006}
    683cf6f4
Name
Last commit
Last update
..
runtime-array.cc Loading commit data...
runtime-atomics.cc Loading commit data...
runtime-bigint.cc Loading commit data...
runtime-classes.cc Loading commit data...
runtime-collections.cc Loading commit data...
runtime-compiler.cc Loading commit data...
runtime-date.cc Loading commit data...
runtime-debug.cc Loading commit data...
runtime-forin.cc Loading commit data...
runtime-function.cc Loading commit data...
runtime-futex.cc Loading commit data...
runtime-generator.cc Loading commit data...
runtime-internal.cc Loading commit data...
runtime-interpreter.cc Loading commit data...
runtime-intl.cc Loading commit data...
runtime-literals.cc Loading commit data...
runtime-module.cc Loading commit data...
runtime-numbers.cc Loading commit data...
runtime-object.cc Loading commit data...
runtime-operators.cc Loading commit data...
runtime-promise.cc Loading commit data...
runtime-proxy.cc Loading commit data...
runtime-regexp.cc Loading commit data...
runtime-scopes.cc Loading commit data...
runtime-strings.cc Loading commit data...
runtime-symbol.cc Loading commit data...
runtime-test.cc Loading commit data...
runtime-typedarray.cc Loading commit data...
runtime-utils.h Loading commit data...
runtime-wasm.cc Loading commit data...
runtime-weak-refs.cc Loading commit data...
runtime.cc Loading commit data...
runtime.h Loading commit data...