• Benedikt Meurer's avatar
    [turbofan] Reduce overhead of megamorphic property accesses. · a15ad0d3
    Benedikt Meurer authored
    We had an optimization in Crankshaft where we would call into the
    megamorphic handler stub directly if an inline cache was already
    found to be megamorphic when it hit the optimizing compiler. This
    way we could avoid the dispatch overhead when we know that there's
    no point in checking for the other states anyways. However we somehow
    missed to port this optimization to TurboFan.
    
    Now this change introduces support to call into LoadIC_Megamorphic and
    KeyedLoadIC_Megamorphic directly (plus the trampoline versions), which
    saves quite a lot of overhead for the cases where the map/name pair is
    found in the megamorphic stub cache, and it's quite a simple change. We
    can later extend this to also handle the StoreIC and KeyedStoreIC cases
    if that turns out to be beneficial.
    
    This improves the score on the Octane/TypeScript test by around ~2%
    and the TypeScript test in the web-tooling-benchmark by around ~4%. On
    the ARES-6 Air test the steady state mean improves by 2-4%, and on the
    ARES-6 ML test the steady state mean seems to also improve by 1-2%, but
    that might be within noise.
    
    On a micro-benchmark that just runs `o.x` in a hot loop on a set of 9
    different objects, which all have `x` as the first property and are
    all in fast mode, we improve by around ~30%, and are now almost on par
    with JavaScriptCore.
    
    Bug: v8:6344, v8:6936
    Change-Id: Iaa4c6e34c37e78da217ee75f32f6acc95a834250
    Reviewed-on: https://chromium-review.googlesource.com/1215623Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
    Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
    Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#55803}
    a15ad0d3
Name
Last commit
Last update
..
api Loading commit data...
asmjs Loading commit data...
assembler Loading commit data...
base Loading commit data...
compiler Loading commit data...
compiler-dispatcher Loading commit data...
heap Loading commit data...
interpreter Loading commit data...
libplatform Loading commit data...
parser Loading commit data...
torque Loading commit data...
utils Loading commit data...
wasm Loading commit data...
zone Loading commit data...
BUILD.gn Loading commit data...
DEPS Loading commit data...
allocation-unittest.cc Loading commit data...
bigint-unittest.cc Loading commit data...
cancelable-tasks-unittest.cc Loading commit data...
char-predicates-unittest.cc Loading commit data...
code-stub-assembler-unittest.cc Loading commit data...
code-stub-assembler-unittest.h Loading commit data...
counters-unittest.cc Loading commit data...
detachable-vector-unittest.cc Loading commit data...
eh-frame-iterator-unittest.cc Loading commit data...
eh-frame-writer-unittest.cc Loading commit data...
locked-queue-unittest.cc Loading commit data...
object-unittest.cc Loading commit data...
register-configuration-unittest.cc Loading commit data...
run-all-unittests.cc Loading commit data...
source-position-table-unittest.cc Loading commit data...
strings-storage-unittest.cc Loading commit data...
test-helpers.cc Loading commit data...
test-helpers.h Loading commit data...
test-utils.cc Loading commit data...
test-utils.h Loading commit data...
testcfg.py Loading commit data...
unicode-unittest.cc Loading commit data...
unittests.status Loading commit data...
utils-unittest.cc Loading commit data...
value-serializer-unittest.cc Loading commit data...