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

Replace sort implementations #124032

Merged
merged 13 commits into from
Jun 20, 2024
Merged

Replace sort implementations #124032

merged 13 commits into from
Jun 20, 2024

Commits on May 16, 2024

  1. Replace sort implementations

    - `slice::sort` -> driftsort
      https://github.com/Voultapher/sort-research-rs/blob/main/writeup/driftsort_introduction/text.md
    
    - `slice::sort_unstable` -> ipnsort
      https://github.com/Voultapher/sort-research-rs/blob/main/writeup/ipnsort_introduction/text.md
    
    Replaces the sort implementations with tailor made ones that strike a
    balance of run-time, compile-time and binary-size, yielding run-time and
    compile-time improvements. Regressing binary-size for `slice::sort`
    while improving it for `slice::sort_unstable`. All while upholding the
    existing soft and hard safety guarantees, and even extending the soft
    guarantees, detecting strict weak ordering violations with a high chance
    and reporting it to users via a panic.
    
    In addition the implementation of `select_nth_unstable` is also adapted
    as it uses `slice::sort_unstable` internals.
    Voultapher committed May 16, 2024
    Configuration menu
    Copy the full SHA
    e49be41 View commit details
    Browse the repository at this point in the history
  2. Fix tidy errors

    Voultapher committed May 16, 2024
    Configuration menu
    Copy the full SHA
    1a6b0e4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d20b119 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8300f67 View commit details
    Browse the repository at this point in the history
  5. Fix linkchecker doc errors

    Also includes small doc fixes.
    Voultapher committed May 16, 2024
    Configuration menu
    Copy the full SHA
    88fb5ed View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2024

  1. Apply review comments

    Voultapher committed Jun 16, 2024
    Configuration menu
    Copy the full SHA
    f7496f5 View commit details
    Browse the repository at this point in the history
  2. Remove reliance on const_trait in sort implementations

    const_trait in conjunction with specialization was
    deemed not ready for usage in this scenario. So
    instead a two-stage trait specialization approach
    is used. This approach is likely worse for
    compile-times. Future work that enables
    const_trait can revert back to the previous
    version as outlined in the comment marked
    FIXME(effects).
    Voultapher committed Jun 16, 2024
    Configuration menu
    Copy the full SHA
    9889ab1 View commit details
    Browse the repository at this point in the history
  3. Fix doc-link issue

    Voultapher committed Jun 16, 2024
    Configuration menu
    Copy the full SHA
    24697ac View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2024

  1. Fix unintended regression for Freeze + Copy types

    Freeze + Copy types should be allowed to choose between all three
    small-sort variants. With the recent changes to small-sort selection,
    a regression was added that only let such types choose between network
    and fallback. It can now also choose general where appropriate.
    Voultapher committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    032ad4c View commit details
    Browse the repository at this point in the history
  2. Revert panic_safe test changes

    The changes made only a limited improvement for the current small
    miri coverage and in general test coverage of the sort implementations.
    But they exploded test times from ~13s to ~240s, which is not deemed
    worth it.
    Voultapher committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    7326169 View commit details
    Browse the repository at this point in the history
  3. Add missing CopyMarker impl

    Due to refactoring the const_trait usage, the CopyMarker impl was
    accidentally deleted, which had the consequence that the Copy
    specialization for the small-sort was never picked.
    Voultapher committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    b7deff3 View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2024

  1. Improve html-checker error message

    The previous message omits which of the dozens of tools called tidy is
    meant. And it's written in a way that one can easily miss the *not*,
    thinking it reads "Note that `tidy` is the in-tree `src/tools/tidy` but
    needs to be installed". The error message should hopefully help future
    contributors.
    Voultapher committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    5caa7f9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a895ef7 View commit details
    Browse the repository at this point in the history