Table of Contents
Fetching ...

bsort: A theoretically efficient non-comparison-based sorting algorithm for integer and floating-point numbers

Benjamín Guzmán

TL;DR

Bsort is a non-comparison-based sorting algorithm for signed and unsigned integers, and floating-point values, and floating-point values that unifies these cases through an approach derived from binary quicksort, achieving runtime asymptotic behavior and auxiliary space.

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.

bsort: A theoretically efficient non-comparison-based sorting algorithm for integer and floating-point numbers

TL;DR

Bsort is a non-comparison-based sorting algorithm for signed and unsigned integers, and floating-point values, and floating-point values that unifies these cases through an approach derived from binary quicksort, achieving runtime asymptotic behavior and auxiliary space.

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 runtime asymptotic behavior and auxiliary space, where 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.
Paper Structure (11 sections, 5 theorems, 4 equations, 9 figures, 2 tables, 5 algorithms)

This paper contains 11 sections, 5 theorems, 4 equations, 9 figures, 2 tables, 5 algorithms.

Key Result

Theorem 1

Let $x$ be a rational number with a finite fractional representation in an integer base $b > 1$. Then $x$ can be expressed in the form: where $s \in \{-1, 1\}$ is the sign, $m \in \mathbb{N}_0$ the mantissa, and $p \in \mathbb{Z}_0^{-}$ the exponent.

Figures (9)

  • Figure 1: Tracing of binary quicksort algorithm
  • Figure 2: Tracing of bsort algorithm for signed integers using two's complement notation.
  • Figure 3: IEEE-754 floating-point values representation. In green the sign bit, in blue the exponent bits, and in red the mantissa bits.
  • Figure 4: Tracing of bsort for floating-point values. For clarity, only relevant partition indexes ($k_1$, $k_3$, $k_5$) were illustrated.
  • Figure 5: Performance comparison for integer types char, short, int, and long long.
  • ...and 4 more figures

Theorems & Definitions (10)

  • Theorem 1
  • proof
  • Theorem 2: Necessity of sort order
  • proof
  • Theorem 3: Sufficiency of sort order
  • proof
  • Theorem 4
  • proof
  • Theorem 5
  • proof