# scandum/quadsort

Quadsort is a branchless stable adaptive mergesort faster than quicksort.

Repository: https://github.com/scandum/quadsort
Canonical: https://ross.abutalabs.com/products/quadsort
Language: C
License: Unlicense
License Family: permissive
Topics: timsort, sorting, algorithm, sort, c, implementation, merge, quick, visualization
Last push: 2024-07-27T13:01:48+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 2395, "days_push": 767, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2203, forks 110 (observed 2026-08-28T04:06:25.755233+00:00)

## What it is
Quadsort is a branchless stable adaptive merge sort implemented in C, designed to outperform quicksort on many workloads. It uses a quad swap analyzer to detect ordered and reverse-ordered data with minimal comparisons before merging.

## Use cases
- sort arrays faster than quicksort
- stable sorting in C
- sort nearly-ordered data efficiently
- branchless sorting algorithm
- compare sorting algorithms like timsort
- learn how adaptive merge sort works

## When to choose
- You need a stable, adaptive sort in C with strong performance on partially ordered data
- You want a public-domain (Unlicense) sorting implementation to embed in a project
- You are benchmarking or studying sorting algorithm design

## When to avoid
- You need a sort in a language other than C without porting
- You just need a built-in standard library sort and don't care about micro-optimizations
- You need parallel or external (disk-based) sorting

## Facets
- artifact type: library
- maturity: active
- function: benchmarking, math
- domain: performance, developer-tools
- platform: c, cross-platform
- tags: sorting, merge-sort, branchless, stable-sort, adaptive-sort, algorithms

## Member repositories
- scandum/quadsort (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:25.755233+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:47:00.713344+00:00, confidence not recorded.
  - readme: https://github.com/scandum/quadsort (fetched 2026-08-28T04:06:25.755233+00:00, sha 2cac8f0d94f1)
- Data as of 2026-08-30T08:39:29.467469+00:00.
