• Z Nguyen-Huu's avatar
    Reland "Improve NumberToString when cache miss and Smi" · 22874998
    Z Nguyen-Huu authored
    This is a reland of 1b35c0fa
    
    Reason for revert: Seems to reliably break a numerics test:
    https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20debug/31516
    
    It was really slow and timeout with debug build run this test
    mjsunit/math-exp-precision with --optimize-for-size because we resize
    cache in CSA. Default this to runtime would avoid the timeout.
    
    Also with --optimize-for-size, we don't have enough space to allocate
    full-size cache so avoid to resize cache in this case.
    
    In my local PC, time for this test decreases as follows.
    Before: 52s
    After: 3s
    
    Original change's description:
    > Improve NumberToString when cache miss and Smi
    >
    > Cache miss was handled in runtime before. This change add fast path for
    > Smi in this case.
    >
    > Perf show 30% improvement for the following example.
    > Before 67 ms
    > After 42 ms
    >
    > const start = new Date();
    > const MAX = 1000000;
    > for (var i = 0; i < MAX; i++) {
    >     i.toString();
    > }
    > const end = new Date();
    > console.log("Time :"+ (end-start));
    >
    > Change-Id: I162e9c35f58551ca6a5a0efe79fb7c7b482a8594
    > Bug: v8:10477
    > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2332866
    > Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
    > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#69362}
    
    Bug: v8:10477
    Change-Id: I892a9007210032640d0bf22e61c8e7ad1a4377c4
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2351398Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
    Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
    Commit-Queue: Leszek Swirski <leszeks@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#69413}
    22874998
Name
Last commit
Last update
build_overrides Loading commit data...
custom_deps Loading commit data...
docs Loading commit data...
gni 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...
.clang-tidy Loading commit data...
.editorconfig Loading commit data...
.flake8 Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython 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...
COMMON_OWNERS Loading commit data...
DEPS Loading commit data...
ENG_REVIEW_OWNERS Loading commit data...
INFRA_OWNERS Loading commit data...
INTL_OWNERS 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...
MIPS_OWNERS Loading commit data...
OWNERS Loading commit data...
PPC_OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
S390_OWNERS Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...