• Ross McIlroy's avatar
    [SFI] Always store function_literal_id in SFI. · f92d7196
    Ross McIlroy authored
    Calling FindIndexInScript performs a linear search on the script functions and can
    take considerable time. With Bytecode flushing we will lose the function_literal_id
    and have to call FindIndexInScript if we ever recompile the flushed function. This
    can take a significant proportion of the recompilation time and has caused regressions
    in rendering times for some web applications (e.g, 395ms in FindIndexInScript for 132ms
    spent lazily re-compiling code).
    
    To avoid this, add function_literal_id back into the SFI and remove it from
    UnoptimizedCompileInfo. This will slightly regress memory usage (particularly
    in cases where many of the SFIs are compiled), however it means we can remove
    the FindIndexInScript function and avoid these long-tail regressions when
    bytecode is flushed.
    
    BUG=chromium:965833
    
    Change-Id: Ia31e82eb6c871a6d698a518326a8555822a7a1d8
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1669700Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
    Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#62319}
    f92d7196
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-api-tests 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...