• Simon Zünd's avatar
    [array] Eagerly copy elements into a FixedArray for sorting · e7d414a2
    Simon Zünd authored
    This CL changes Array#sort to work roughly like:
        1) Call [[Get]] on the receiver in [0, length) and store to FA
        2) Use the existing TimSort to sort that FA
        3) Call [[Set]] on the receiver in [0, length) using the result
    
    This has the advantage that we no longer need different fast-paths
    for the sorting algorithm itself, only for step 1 and 3. This results
    in a code size reduction of ~2650 bytes.
    
    This CL does not include optimizations that elides step 1 or 3.
    
    Change-Id: I7f2e35067a6ec356add8b0c50b160d76813c536d
    Reviewed-on: https://chromium-review.googlesource.com/c/1458237
    Commit-Queue: Simon Zünd <szuend@chromium.org>
    Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#59653}
    e7d414a2
Name
Last commit
Last update
..
LICENSE Loading commit data...
array-sort.tq Loading commit data...