• zhengxing.li's avatar
    X87: [builtins] Make Math.max and Math.min fast by default. · 8944d36f
    zhengxing.li authored
      port cb9b8010 (r33582)
    
      original commit message:
      The previous versions of Math.max and Math.min made it difficult to
      optimize those (that's why we already have custom code in Crankshaft),
      and due to lack of ideas what to do about the variable number of
      arguments, we will probably need to stick in special code in TurboFan
      as well; so inlining those builtins is off the table, hence there's no
      real advantage in having them around as "not quite JS" with extra work
      necessary in the optimizing compilers to still make those builtins
      somewhat fast in cases where we cannot inline them (also there's a
      tricky deopt loop in Crankshaft related to Math.min and Math.max, but
      that will be dealt with later).
    
      So to sum up: Instead of trying to make Math.max and Math.min semi-fast
      in the optimizing compilers with weird work-arounds support %_Arguments
      %_ArgumentsLength, we do provide the optimal code as native builtins
      instead and call it a day (which gives a nice performance boost on some
      benchmarks).
    
    BUG=
    
    Review URL: https://codereview.chromium.org/1659623003
    
    Cr-Commit-Position: refs/heads/master@{#33652}
    8944d36f
Name
Last commit
Last update
benchmarks Loading commit data...
build Loading commit data...
docs 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...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE 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...
Makefile.nacl 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...