• peterwmwong's avatar
    Reland "[builtins]: Optimize CreateTypedArray to use element size log 2 for calculations." · 02b9847f
    peterwmwong authored
    This is a reland of c9ef0405
    
    Original change's description:
    > [builtins]: Optimize CreateTypedArray to use element size log 2 for calculations.
    >
    > TypedArrayElementsInfo now represents an element's size as a log 2 and typed as
    > uintptr.  This simplifies and speeds up (avoids possible HeapNumber allocations) a
    > number of calculations:
    >
    >   - Number of Elements (length) -> Byte Length - is now a WordShl
    >   - Byte Length -> Number of Elements (length) - is now a WordShr
    >   - Testing alignment (byte offset or length)  - is now a WordAnd
    >
    > These element/byte length related calculations are encapsulated in
    > TypedArrayElementsInfo as struct methods.
    >
    > This reduces the size of CreateTypedArray by 2.125 KB (24%) on Mac x64.release:
    >   - Before: 9,088
    >   - After:  6,896
    >
    > This improves the performance of the following microbencmarks
    >   - TypedArrays-ConstructWithBuffer: ~87%
    >   - TypedArrays-SubarrayNoSpecies:   ~28%
    >
    > Bug: v8:7161
    > Change-Id: I2239fd0e0af9d3ad55cd52318088d3c7c913ae44
    > Reviewed-on: https://chromium-review.googlesource.com/c/1456299
    > Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
    > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
    > Reviewed-by: Simon Zünd <szuend@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#59531}
    
    Bug: v8:7161, chromium:932034
    Change-Id: I5c3dc34c549234417f95b404e7d49b2fd496fa69
    Reviewed-on: https://chromium-review.googlesource.com/c/1476306
    Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
    Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#59728}
    02b9847f
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...
OWNERS Loading commit data...