• Benedikt Meurer's avatar
    [turbofan] Constant-fold keyed loads of sealed properties. · 7816413f
    Benedikt Meurer authored
    We can constant-fold JSLoadProperty(o, i) when o is a known object (i.e.
    TurboFan's context specialization provides a known non-null/-undefined
    constant value for it), i is a known array index and o["i"] is an
    element on the receiver, that is non-configurable and non-writable (i.e.
    o was frozen using Object.freeze earlier, or o is a String object).
    
    This significantly reduces execution time of the tagged templates
    micro-benchmarks (ES6 and Babel transpiled), when combined with the
    CL https://chromium-review.googlesource.com/c/v8/v8/+/677462, it goes
    from
    
      templateStringTagES5: 4552 ms.
      templateStringTagES6: 14185 ms.
      templateStringTagBabel: 7626 ms.
    
    to
    
      templateStringTagES5: 4550 ms.
      templateStringTagES6: 616 ms.
      templateStringTagBabel: 589 ms.
    
    so overall a solid 23x improvement on the ES6 benchmark. This is
    representative of the six-speed-templatestringtag-es6 benchmark.
    
    Bug: v8:6819, v8:6820, v8:6831
    Change-Id: Ia45fbdf92977bfbe7400cfa60bd362b78086dc26
    Reviewed-on: https://chromium-review.googlesource.com/677603Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
    Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#48131}
    7816413f
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
docs Loading commit data...
gni Loading commit data...
gypfiles 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...
.editorconfig Loading commit data...
.gitignore Loading commit data...
.gn 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...
Makefile Loading commit data...
Makefile.android 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...