Skip to main content
QUICK REVIEW

[论文解读] bsort: A theoretically efficient non-comparison-based sorting algorithm for integer and floating-point numbers

Benjamín Guzmán|arXiv (Cornell University)|Mar 9, 2026
Algorithms and Data Compression被引用 0
一句话总结

bsort 是一种就地的、非比较型的有符号/无符号整数和浮点值排序器,时间复杂度为 O(nw),空间复杂度为 O(w),采用统一的二进制快速排序风格的位分区方法。它在较小字长下理论上具有优势,并给出带有硬件考虑的实证分析。

ABSTRACT

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.

研究动机与目标

  • 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.

提出的方法

  • 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.
bsort: A theoretically efficient non-comparison-based sorting algorithm for integer and floating-point numbers

实验结果

研究问题

  • 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?

主要发现

AlgorithmRuntimeMemoryIn-placeComp.
Introsort∗O(n log n)O(log n)YesYes
Spreadsort∗O(n(k/s + s))O(n)NoNo
ska_sort∗O(n w)O(d · k)YesNo
QuicksortO(n log n)O(log n)YesYes
bsortO(n w)O(w)YesNo
  • 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.
bsort: A theoretically efficient non-comparison-based sorting algorithm for integer and floating-point numbers

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。