• vogelheim's avatar
    Speed up parsing w/ grammar shortcut. · 7a100dff
    vogelheim authored
    Certain token combinations (e.g. number literal followed by semicolon) will
    result in a single AST node, but require many levels of recursive descent
    parsing to determine this (11 in this example). For some 'obvious'
    combinations, we'll simply generate the appropriate AST node fairly far up
    in the call tree.
    
    This yields a mild but consistent parser speedup. The main con is code duplication.
    
    [Speedup between 0..20ms in parse time among a set of 25 commonly used sites. Speedup of ~180ms for a site w/ a very large codebase (adwords.google.com). Minor slow-downs between 0..8ms for <20% of sites.]
    
    R=marja@chromium.org
    BUG=v8:4947
    
    Review-Url: https://codereview.chromium.org/2188153002
    Cr-Commit-Position: refs/heads/master@{#38591}
    7a100dff
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/binutils Loading commit data...
tools Loading commit data...
.clang-format 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...