• Benedikt Meurer's avatar
    [dataview] Introduce JSDataView::data_pointer field. · 4ef714a6
    Benedikt Meurer authored
    This is a preparation for doing a similar change to JSTypedArrays to
    be able to finally access huge ArrayBuffers with TypedArrays. This CL
    itself improves the performance of DataViews, sometimes to be even
    faster than TypedArrays now. On the test case[1] we go from
    
      testDataViewGetUint8: 711 ms.
      testUint8Array: 654 ms.
      testDataViewGetUint16: 801 ms.
      testUint16Array: 649 ms.
      testDataViewGetInt32: 699 ms.
      testInt32Array: 648 ms.
      testDataViewGetFloat64: 701 ms.
      testFloat64Array: 650 ms.
    
    to
    
      testDataViewGetUint8: 622 ms.
      testUint8Array: 656 ms.
      testDataViewGetUint16: 634 ms.
      testUint16Array: 656 ms.
      testDataViewGetInt32: 629 ms.
      testInt32Array: 655 ms.
      testDataViewGetFloat64: 631 ms.
      testFloat64Array: 661 ms.
    
    so the performance improves by up to **20%**.
    
    [1] https://github.com/bmeurer/js-micro-benchmarks/blob/master/bench-dataview.js
    
    Tbr: ulan@chromium.org
    Bug: chromium:225811, v8:4153, v8:8383
    Change-Id: Ie4409e2fe96e5085ddcf5eb3f24f3cacfb3afe02
    Cq-Include-Trybots: luci.chromium.try:linux-rel,win7-rel
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1601144
    Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
    Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
    Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#61464}
    4ef714a6
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...