vector-qsort
Vectorized quicksort for NumPy arrays using Google Highway SIMD.
pip install vector-qsort
Quick start
import numpy as np
import vector_qsort
data = np.array([3.14, -1.5, 42.0, 0.0, -100.5, 2.71], dtype=np.float32)
# In-place SIMD sort
vector_qsort.sort(data)
# array([-100.5, -1.5, 0.0, 2.71, 3.14, 42.0], dtype=float32)
# Descending
vector_qsort.sort(data, desc=True)
# Non-mutating copy
sorted_data = vector_qsort.sorted(data)
sort() sorts 1D contiguous arrays in place with zero copies. sorted() returns a sorted copy. Supports float32, float64, int32, uint32, int64, uint64, int16, and uint16.
Benchmarks
Measured on Apple Silicon (ARM NEON) vs NumPy's native in-place np.sort():
python bench/bench_sort.py
| Dtype | Size | Distribution | NumPy (median) | vector-qsort | Speedup |
|---|---|---|---|---|---|
float32 |
100,000 | Random | 1.14 ms | 0.73 ms | 1.57x |
float32 |
5,000,000 | Random | 81.97 ms | 50.39 ms | 1.63x |
float64 |
100,000 | Random | 2.25 ms | 1.33 ms | 1.70x |
float64 |
5,000,000 | Plateau | 39.40 ms | 18.04 ms | 2.18x |
Note on scalar sorts
Modern scalar sorts like driftsort and ipnsort excel at generic types and presorted run-detection. vector-qsort is designed specifically for raw numeric throughput on contiguous buffers by saturating SIMD vector lanes.
License
MIT © Hemanth.HM
Metadata
Release files for vector-qsort 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vector_qsort-0.1.0.tar.gz | 6.9 kB | Without provenance | Details for vector_qsort-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vector_qsort-0.1.0-cp314-cp314-macosx_26_0_arm64.whl | CPython 3.14 | CPython 3.14 | macOS 26.0+ ARM64 | Details for vector_qsort-0.1.0-cp314-cp314-macosx_26_0_arm64.whl |
Total release size: 1.5 MB
Release files / vector_qsort-0.1.0.tar.gz
| Download URL | vector_qsort-0.1.0.tar.gz |
|---|---|
| Size | 6.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2132f25e34c62d54bd9a4d35cb7221173ed8bb3aa6ae68c58e1c7829885505d4
|
|
BLAKE2b-256 checksum How to use checksums |
806287e01e9778b35f8631da26520b589b8f28678de03d6fc6f03a49e9953e3f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / vector_qsort-0.1.0-cp314-cp314-macosx_26_0_arm64.whl
| Download URL | vector_qsort-0.1.0-cp314-cp314-macosx_26_0_arm64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.14 macOS 26.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
6089e03a39c8735b1eb05bbda9611db01bc3b95f922b7c0a6c05d8dd18c2e8f8
|
|
BLAKE2b-256 checksum How to use checksums |
8e7ad5da0d4026e8e38ec973d6703b58e7d76adb2d2eef8c409425e431793f51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Security for vector-qsort 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.