Skip to content

Conversation

dg-pb
Copy link
Contributor

@dg-pb dg-pb commented Oct 11, 2025

Logic is as follows:

# 1. Several non-adaptive runs to estimate
#    initial `stdev` (minimal overhead)
...
# 2. Adaptive routine
while (ok < n && stdev < dynamic_threshold) {
    ...
}
# 3. Finish with the standard code (identical to what it was)

Compared to previous attempt, this has slightly less benefit for favourable cases, but minimises impact for cases where this has no benefit.

High level benchmarks.
Unwrapped float/int:

unwrapped

float/int wrapped in one-element list:

wrapped

@skirpichev skirpichev requested a review from tim-one October 12, 2025 09:49
@tim-one
Copy link
Member

tim-one commented Oct 13, 2025

Is your name in Misc/ACKS already? I didn't see it. I don't think it's strictly required, but the whole community appreciates the only comprehensive record we have of everyone who contributed code. So strongly encouraged.

@tim-one
Copy link
Member

tim-one commented Oct 13, 2025

Please add more words to listsort.txt, and/or more code comments. It's not obvious what the substantial amount of new code is doing, or why. What are the implicit preconditions? Postconditions? Invariants? High-level overview of intent? Discussion of tradeoffs tried? What would you want to see spelled out if this code were brand new to you? (The single most useful question I ask myself, which made listssort.txt as wordy as it is 😉 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants