Efficient sorting of small fixed-size inputs
How efficiently can a fixed small number of inputs be sorted correctly? This problem concerns instruction counts and measured running time of concrete routines, compared on specified processors and inputs.
Why it matters and what counts as progress
Why it matters: Small sorting routines are used inside larger library algorithms, so a measured constant-factor improvement can affect widely deployed software.
What counts as progress: Find a correct routine with fewer instructions or faster matched benchmarks. Reproducing a speedup on one processor does not establish universal optimality.
How the problem developed
- 7 Jun 2023 · AI contribution [1]
Daniel J. Mankowitz and colleagues; AlphaDev Reported reinforcement-learning discoveries of small sorting routines translated into C++ and incorporated into LLVM libc++. Reported speedups reach 70% for length-five sequences and about 1.7% for sequences exceeding 250,000 elements under the paper’s tested configurations.
- 23 Jul 2023 · Human follow-up [2]
Cassio Neri Presented two shorter counterexamples to the claimed 17-instruction minimality of Sort3AlphaDev and a ++ implementation reported faster than that particular routine.
Follow new AI contributions to this problem.
How the problem developed
AI Proof Watch
Efficient sorting of small fixed-size inputs
References
- [1]Original source
- [2]Subsequent shorter and faster Sort3 research
AI contribution
AlphaDev: faster small sorting routines in LLVM libc++
DeepMind reports AI-discovered assembly sorting routines translated to C++ and incorporated in LLVM libc++. Its tests report up to 70% improvement for length-five inputs and about 1.7% for inputs exceeding 250,000 elements.
Sources
Publication history
Daily emails by default, only when there’s an update.