[Paper Review] bsort: A theoretically efficient non-comparison-based sorting algorithm for integer and floating-point numbers
bsort is an in-place, non-comparison-based sorter for signed/unsigned integers and floating-point values with O(nw) time and O(w) space, using a unified binary-quickSort–style bit partitioning approach. It shows theoretical advantage in small word sizes and provides empirical analysis with hardware considerations.
This paper presents bsort, a non-comparison-based sorting algorithm for signed and unsigned integers, and floating-point values. The algorithm unifies these cases through an approach derived from binary quicksort, achieving $O(wn)$ runtime asymptotic behavior and $O(w)$ auxiliary space, where $w$ is the element word size. This algorithm is highly efficient for data types with small word sizes, where empirical analysis exhibits performance competitive with highly optimized hybrid algorithms from popular libraries.
Motivation & Objective
- Motivate a unified non-comparison-based sorter for integers and floating-point data.
- Present a binary-quickSort-based core that partitions by bit masks and processes all s bits.
- Show how to adapt the method to signed integers and IEEE-754 floating-point representations.
- Provide formal proofs of correctness and analyze time/space complexity and practical performance.
- Discuss empirical results and architectural bottlenecks to guide future optimizations.
Proposed method
- Adapt a binary quicksort core to a unified in-place bit-partitioning procedure.
- Define singlePassBSort to partition a range by a bit mask with ascending/descending guidance.
- Use a two-stage handling for signed integers by inverting initial sort direction on the first pass.
- Sort floating-point values by a three-pass hierarchy: sign, exponent, then mantissa; proofs establish correctness.
- Provide detailed correctness proofs for signed integers and floating-point representations (Theorems 2 and 3).
- Offer empirical benchmarks comparing bsort to introsort, spreadsort, and ska_sort under 64-bit environment.

Experimental results
Research questions
- RQ1Can a single unified, in-place, non-comparison-based algorithm sort signed/unsigned integers and floating-point values correctly?
- RQ2What is the theoretical time and space complexity of such an algorithm in terms of word size w and element count n?
- RQ3How does the algorithm perform empirically against hybrid non-comparison-based and comparison-based sorts for typical word sizes?
- RQ4What architectural bottlenecks affect practical performance, and how might future optimizations improve them?
Key findings
- bsor t sorts in O(nw) time with O(w) auxiliary space.
- For small word sizes, empirical results are competitive with optimized hybrids like spreadsort and ska_sort.
- The algorithm is in-place and uses bitwise partitioning without comparisons, but recursion depth equals the word size w.
- Signed integers require inverting the initial pass direction to maintain correct partitioning.
- Floating-point sorting uses a sign → exponent → mantissa hierarchy to preserve numeric order (proofs provided).
- Benchmark results show linear scaling with n and reveal branch, cache, and stack-related bottlenecks limiting performance on larger word sizes.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.