• Simon Zünd's avatar
    [typedarray] Change Torque sort implementation · d0ecfe25
    Simon Zünd authored
    This CL changes how TypedArray.p.sort is implemented in Torque, mainly
    to address the binary memory size of the builtin.
    
    With this CL the memory comes down from 53611 to 4215 (as reported
    by --print-builtin-size on a x64.release build).
    With the following performance impact
    on the relevant benchmarks:
    
    Benchmark  Original (JS)   Torque (initial)    This CL
    
    IntTypes            83.9              263.7      202.3
    BigIntTypes         32.1               54.6       47.2
    FloatTypes          99.3              138.7      109.3
    
    This is achieved by pushing the Load/Store dispatch based on
    the elements kind into separate builtins that are executed
    for each load/store. This results in only one version of the
    sorting algorithm instead of one version per elements kind.
    
    R=jgruber@chromium.org
    
    Bug: chromium:837282
    Change-Id: I7fe2da3cbfd01531d070128126a0d56d3dd6bdcc
    Reviewed-on: https://chromium-review.googlesource.com/1033744
    Commit-Queue: Simon Zünd <szuend@google.com>
    Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#52937}
    d0ecfe25
builtins-typed-array-gen.cc 79.9 KB