• Simon Zünd's avatar
    [typedarray] Implement TypedArray.p.sort using Torque. · 3ea1ad23
    Simon Zünd authored
    This CL implements TypedArray.p.sort in Torque. The Torque
    version works basically the same as the existing JS builtin:
    
    When no comparison function is provided, the C++ fast path builtin
    is used. Otherwise a quicksort written in Torque is used, with
    a InsertionSort fallback for smaller arrays.
    
    The JS quicksort implementation also containes a more elaborate
    third pivot calculation for larger arrays. This is currently not done.
    
    Reported benchmark results are only for those, where a custom
    comparison function is provided. The numbers for the C++ path stayed
    the same.
    
    Benchmark   Current (JS)       Torque    Speedup
    
    IntTypes            83.9        263.7        3.1
    BigIntTypes         32.1         54.6        1.7
    FloatTypes          99.3        138.7        1.4
    
    R=danno@chromium.org, jgruber@chromium.org
    
    Bug: v8:7382
    Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
    Change-Id: I7abe7ceff525bab24f302d2f06b5961cca770d24
    Reviewed-on: https://chromium-review.googlesource.com/1021691
    Commit-Queue: Simon Zünd <szuend@google.com>
    Reviewed-by: 's avatarDaniel Clifford <danno@chromium.org>
    Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
    Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
    Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#52776}
    3ea1ad23
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides 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...
.editorconfig Loading commit data...
.git-blame-ignore-revs 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...
ChangeLog Loading commit data...
DEPS 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...
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...