• 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...
cctest Loading commit data...
common Loading commit data...
debugger Loading commit data...
fuzzer Loading commit data...
inspector Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mkgrokdump Loading commit data...
mozilla Loading commit data...
preparser Loading commit data...
test262 Loading commit data...
torque Loading commit data...
unittests Loading commit data...
wasm-js Loading commit data...
wasm-spec-tests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...