f92d7196b9
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/+/1669700 Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#62319} |
||
---|---|---|
.. | ||
compiler-dispatcher-unittest.cc | ||
optimizing-compile-dispatcher-unittest.cc |