• peterwmwong's avatar
    [builtins] Fast path TA.p.subarray creating TypedArray when default constructor is used · 7c35c03b
    peterwmwong authored
    Previously, the following call sequence was always made when creating resulting
    subsetted TypedArray:
    1) TFJ TypedArrayPrototypeSubArray
    2) TFS TypedArrayConstructor
    3) TFS CreateTypedArray
    
    This CL, skips #2 and goes straight to #3 when the default constructor (builtin) is
    safe to use (IsPrototypeTypedArrayPrototype and
    !IsTypedArraySpeciesProtectorCellInvalid).
    
    Local TypedArrays/SubarrayNoSpecies microbenchmark shows ~35-40% improvement...
    
    BEFORE
    TypedArrays-SubarrayNoSpecies(Score): 1033530
    TypedArrays-SubarrayNoSpecies(Score): 1018490
    TypedArrays-SubarrayNoSpecies(Score): 1037030
    
    AFTER
    TypedArrays-SubarrayNoSpecies(Score): 1439030
    TypedArrays-SubarrayNoSpecies(Score): 1417540
    TypedArrays-SubarrayNoSpecies(Score): 1405980
    
    Bug: v8:7161
    Change-Id: I356dace36570aa161ffe208a57a80e46714121a2
    Reviewed-on: https://chromium-review.googlesource.com/c/1331154
    Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
    Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
    Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#57458}
    7c35c03b
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
custom_deps Loading commit data...
docs Loading commit data...
gni Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.clang-tidy Loading commit data...
.editorconfig Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...