Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve performance of stable sort #100856

Closed
wants to merge 5 commits into from

Commits on Nov 4, 2022

  1. Improve performance of stable sort

    This reworks the internals of slice::sort. Mainly:
    - Introduce branchless swap_next_if and optimized sortX functions
    - Speedup core batch extension with sort16
    - Many small tweaks to reduce the amount of branches/jumps
    
    This commit is incomplete and MUST NOT be merged as is. It is missing Copy
    detection and would break uniqueness preservation of values that are being
    sorted.
    Voultapher committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    d46dc75 View commit details
    Browse the repository at this point in the history
  2. Fix formatting

    Voultapher committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    d5f748e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    05a6b9c View commit details
    Browse the repository at this point in the history
  4. Re-use TimSort analysis for small slices

    Add new loop based mini-merge sort for small sizes. This extends
    allocation free sorting for random inputs of types that qualify up to
    32.
    Voultapher committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    bad7e05 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    061d4e8 View commit details
    Browse the repository at this point in the history