# numpy/x86-simd-sort

C++ template library for high performance SIMD based sorting algorithms

Repository: https://github.com/numpy/x86-simd-sort
Canonical: https://ross.abutalabs.com/products/x86-simd-sort
Language: C++
License: BSD-3-Clause
License Family: permissive
Topics: argsort, avx2, avx512, quickselect, quicksort, sort, x86, partialsort
Last push: 2026-06-25T04:47:36+00:00

## Health v2 (maintenance only)
Score: 63/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 89, release rhythm 8, longevity 100
- inputs: {"age_days": 1414, "days_push": 69, "days_rel": 471, "gap_med": 196, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1026, forks 73 (observed 2026-08-28T04:03:16.864000+00:00)

## What it is
A C++ template library providing high-performance SIMD-accelerated sorting routines (qsort, qselect, partial sort, argsort, key-value sort) for built-in integer and float types and custom objects. It automatically selects AVX-512 or AVX-2 code paths based on the runtime processor and is used by NumPy.

## Use cases
- sort large arrays of floats or integers faster than std::sort
- SIMD-accelerated quickselect to find kth smallest element
- partial sort of top-k elements in an array
- argsort / index-based sorting of arrays
- sort arrays of custom C++ objects by a key
- key-value sorting of parallel arrays
- speed up NumPy sort operations on x86 CPUs

## When to choose
- you need maximum sorting throughput on x86-64 hardware with AVX2/AVX-512
- you are sorting numeric data (16/32/64-bit ints and floats) at scale
- you need quickselect or partial sorts, not just full sorts
- you want drop-in routines used by NumPy

## When to avoid
- you need portable sorting across non-x86 architectures (ARM, POWER)
- you are sorting complex objects with expensive comparators rather than numeric keys
- your arrays are tiny where SIMD overhead dominates
- you need stable sorting

## Facets
- artifact type: library
- maturity: active
- function: benchmarking, developer-tools
- domain: performance, developer-tools
- platform: cpp, windows
- tags: simd, avx2, avx512, sorting, quicksort, argsort, quickselect, x86, header-only, numpy, algorithms, linux, macos, gpu

## Member repositories
- numpy/x86-simd-sort (main) score 63

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:16.864000+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-30T07:07:59.334881+00:00, confidence not recorded.
  - readme: https://github.com/numpy/x86-simd-sort (fetched 2026-08-28T04:03:16.864000+00:00, sha d9718da8dbd6)
- Data as of 2026-08-30T08:39:29.467469+00:00.
