The sort at the end of every query is
your hidden bottleneck.
Every retrieval, every ORDER BY, every top-k ends in a sort over millions of scores. CUB is one-size-fits-all — and leaves speed on the table the moment your data has structure.
— up to 20× faster than CUB, never slower.
▶ Watch It Beat CUB — Live
90 seconds, no edits, no hand-picked numbers. Every result is measured live on the GPU and verified correct against std::sort before its speed is shown.
unedited · measured live on RTX PRO 6000 Blackwell · verified against std::sort · watch on YouTube
The One-Size-Fits-All Problem
NVIDIA CUB and Thrust are the industry standard for GPU sorting. They use radix sort, excellent for uniform random data, but blind to real-world structure.
Real data has topology: time series are monotonic, user IDs follow Zipfian distributions, logs arrive nearly-sorted. Using one algorithm for everything leaves 73% of potential performance on the table.
Use MASH when…
If any of these is your problem, the sort is costing you more than you think.
Your top-k sort is the bottleneck at the end of retrieval
Every RAG query ends in a top-k sort over millions of similarity scores. You optimized the model and the index — the sort is the step you never profiled.
CUB leaves speed on the table when your data has structure
Radix sort is blind to topology. MASH fingerprints your data and routes presorted, reverse, and Zipfian distributions to specialized kernels that exit early instead of brute-forcing every key.
You can't risk a sort that's sometimes slower
"Faster on average" is unacceptable in production. MASH matches CUB on uniform random and wins everywhere there's structure — every result measured live on the GPU and verified element-for-element against std::sort.
How MASH Works
MASH is smart, not just fast. It adapts to your data automatically.
Fingerprint
Zero-Overhead Analysis
Analyzes data entropy, sortedness, and distribution during host-to-device transfer.
Intelligent Router
O(1) Adaptive Logic
Instantly selects the optimal algorithm based on data shape. No manual tuning required.
Execute
Specialized Kernels
Executes one of 7 specialized algorithms (SIMD/Warp optimized) for maximum throughput.
How It Performs
Visualized benchmark results. See how MASH routes different data distributions to specialized algorithms.
Throughput Comparison
The visualization above shows CPU benchmark results. The same adaptive routing logic scales to massive GPU parallelism.
MASH GPU achieves up to 8 GB/s throughput, 53x faster than CPU.
License MASH GPUGPU + CPU
Production-ready implementations for both platforms. Route intelligently based on workload.
GPU Implementation
Production Ready
CPU Implementation
Production Ready
Performance Benchmarks
1 billion uint64 keys on a single NVIDIA B300, device-resident (data prestaged on the GPU, transfer excluded). Compared against NVIDIA CUB; every run verified element-for-element against std::sort. Speedups are hardware-specific.
| Distribution | CUB Time | MASH Time | Speedup |
|---|---|---|---|
| Presorted | 48.32 ms | 2.42 ms | 19.99x |
| Dictionary (tiny range) | 43.91 ms | 10.09 ms | 4.35x |
| Narrow range (14-bit) | 45.27 ms | 14.00 ms | 3.24x |
| RAG scores (retrieval) | 45.38 ms | 14.07 ms | 3.23x |
| Reverse | 48.31 ms | 27.30 ms | 1.77x |
| Strided IDs | 46.69 ms | 27.58 ms | 1.69x |
| Uniform Random | 55.18 ms | 55.22 ms | 1.00x |
| Tied on unstructured (uniform) data — no structure to exploit. Up to ~20× where structure exists. Never slower than CUB. Device-resident throughput holds at ~18 Gkeys/s (~145 GB/s), flat to 8 B keys. | |||
All results reproducible with one-click verification scripts. Cryptographic Merkle chain ensures integrity.
Pricing
This is a design-partner product. Pricing is scoped to your workload and deployment, not a fixed list, and design partners get founder-level access and first-mover terms.
Technical Specifications
Requirements and tested configurations.
| Requirement | GPU | CPU |
|---|---|---|
| Runtime | CUDA 11.0+ | C++20, OpenMP |
| Hardware | CC 7.0+ (Volta) | x86-64 |
| Tested GPUs | RTX PRO 6000, GB10, A10G | - |
| Data Types | uint64_t | uint64_t |
| Memory | N×8 bytes temp | N×8 bytes temp |
| Platform | Linux | Ubuntu 20.04+ |
Built For Real Workloads
Where that structure actually lives — and the fingerprint signal MASH routes on.
Time-Series Databases
Time-series data is naturally ordered. MASH detects presorted structure and exits in up to 20x less time.
Analytics Engines
ORDER BY operations on user activity follow Zipfian distributions. MASH sorts only the bits that actually carry information.
Log Processing
Timestamp-ordered logs arrive nearly sorted. Fingerprinting detects this and skips unnecessary work.
Financial Systems
Order books and trade data have local structure. Adaptive routing exploits patterns automatically.
Use case · Agentic RAG
The sort hiding in your retrieval pipeline
Every retrieval ends in a top-k sort over millions of similarity scores. On quantized scores (the billion-vector norm) MASH sorts them about 3× faster than CUB — measured live, verified against std::sort. We time the sort step, not the model.
Ready to Get Started?
Start with a free 30-day trial. Prove the speedup. Become the internal champion.