CS Paper Radar

SotSort: a stable quicksort with a tunable buffer

Lucas Sotomayor

cs.DS ·submitted 2026-11-18 17:33 UTC · v2
code/dataunusual

Abstract

SotSort is a stable comparison sort whose single code path runs with anything from a fixed 16 KB buffer to a full n-element buffer. Its core is a stable quicksort that partitions blocks through the buffer and gathers them with rotations. This report summarises the design, states which parts are borrowed, and compares an implementation against blitsort, fluxsort, glidesort, driftsort, GrailSort and WikiSort. On one 2-vCPU machine, with 32- and 64-bit integers, the constant-memory mode takes between 0.32 and 0.82 of blitsort's time on 17 of 22 input classes and between 0.92 and 1.07 on the other five. With a comparator that rules out the vector partition it is slower than blitsort on 4 of 11 classes, by up to 2.3 times on sorted input. Against Virtual-Memory Powersort, on its authors' own harness and with the same auxiliary memory, the first measurement lost on most inputs; after three changes it located (one of them adopts that algorithm's paging scheme), SotSort is faster in 43 of 48 type and input combinations at n=10^6 on two machines. At n=10^7 on partially sorted integers it is between 7% faster and 7% slower depending on the machine, and on near-random input it is still slower: by 9% on integers at n=10^7, and by 5 to 17% at n=10^6 when comparisons are expensive. All numbers are preliminary.

Comment
5 pages. v2: comparison with Virtual-Memory Powersort on its authors' harness, two machines. Code, tests and raw measurements: https://github.com/sotomayorlucas/sotsort

Closest papers

Nearest neighbours by meaning across the whole index.

TEMPO: A Tag-Based Framework for Efficient Memory Ordering

cs.AR ·2026-09-19 ·Pranith Kumar, Prasun Gera, Hyojong Kim, Chulhyung Park, Hyesoon Kim
top venue similarity 0.51
Abstract · Published at the 2026 59th IEEE/ACM International Symposium on Microarchitecture (MICRO)

Weak-memory processors rely on ordering instructions for correctness, yet conventional implementations often enforce them more conservatively than the memory model requires. This over-enforcement manifests as drain-induced retirement stalls at ordering instructions and conservative squash/replay of speculative loads, suppressing legal executions and reducing throughput. We present TEMPO, a tag-based framework for precise micro-architectural implementation of ordering instructions. TEMPO assigns lightweight ordering tags to instructions and decomposes enforcement across retirement-time predicates and completion-time store ordering, allowing the core to enforce required ordering without conservative retirement serialization. TEMPO eliminates unnecessary retirement serialization at ordering instructions and speculative-load squash/replay. In our evaluation, TEMPO reduces geometric-mean normalized execution cycles by 7.9% on native four-thread workloads and improves geometric-mean IPC by 15.9% on an instrumented SPEC2017 dynamic binary translation (DBT) proxy for cross- ISA execution (e.g., x86-on-Arm), while adding only 262 bytes per core.

0.42

AQLoRA: A Zero-Search Recipe for Fast Quantized LoRA Fine-Tuning

cs.LG ·2026-08-24 ·Md Romyull Islam
code/data similarity 0.48
Abstract · 24 pages, 5 figures, 20 tables. Code and experimental artifacts: https://github.com/Romyull-Islam/AQLoRA

Quantized fine-tuning (QLoRA) saves memory but not time. It dequantizes every 4-bit weight on the fly, so it trains more slowly than fp16 LoRA. We present AQLoRA (Adaptive-Quantization LoRA), a recipe that buys part of that time back. One CPU pass ranks layers by NF4 reconstruction error, with no search and no calibration data, and keeps a fixed fraction of them in fp16. Those layers skip dequantization, which is where the speed comes from. A quality setting adapts every layer. A speed setting adapts only the top blocks, so the backward pass stops early. The selection matches the accuracy of Unsloth's hand-curated dynamic-4bit list. We evaluate on Commonsense-170K across six models and four architecture families, from 1.4B to 14B. The speed setting trains 11.3 +/- 2.3% faster than well-tuned QLoRA and gives up 0.1 to 1.5 accuracy points. It was faster in all thirteen independent timing sessions, at worst by 7%. The quality setting trains 4.8 +/- 2.0% faster, matches QLoRA's accuracy on every model, and is within a point of fp16 LoRA. The memory premium depends on the architecture: 0.06 to 0.8 GiB on the 1-4B models, 0.5 GiB at 7B, 1.9 GiB at 14B. These error bars are measured between independent sessions, not within one. Timing on shared hardware needs three rules: fix the measurement duration, not the step count; measure the noise floor from a duplicated arm; and repeat whole sessions, since on one model three sessions that each passed the floor test spread over 8.2 points. We validate the recipe with controls and report the two that failed. Choosing adapter layers by weight density is no better than random. Choosing protected layers by quantization error is not either, on five models at three budgets with memory-matched controls and downstream on two. The number of protected layers sets the speed; which layers they are does not measurably change accuracy.

0.42

HADES: A Programmable Processing-Near-Memory Engine for Binary Similarity Search

cs.AR ·2026-10-10 ·Pranav M
similarity 0.46
Abstract · 16 pages, 4 TikZ figures

Moving operands to a processor can cost more than the arithmetic performed on them, and for small binary similarity and search workloads data movement can dominate. We present HADES, a programmable processing-near-memory engine built around one shared 32x32-bit 2R1W register-file macro that holds both data and program. Twelve 16-bit opcodes, three working registers and a 32-slot program express ten search workloads in 8 to 19 slots, and SCANP and SCANSEL shorten dual-row and selected scans. A post-layout 2x2 Tiny Tapeout implementation closes timing at 40 MHz with 26,968 square microns of standard cells beside a 15,744 square microns macro. All HADES results come from RTL or gate-level simulation of this implementation, and HADES energy is estimated. Against ESP8266 and ESP32 microcontrollers running plain C, and with an ideal host, HADES answers a resident query 10x to 32x and 2.2x to 11x faster, respectively. End to end, it wins at the evaluated batch sizes of B = 16 and B = 256 against both boards and loses the single-query (B = 1) runs to the ESP32. An Arduino Nano runs a restricted subset. Kernel power stays within about 2% of a spin loop on all three boards. These results hold for plain-C baselines under the evaluated conditions. At this scale the control and instruction storage fit around a shared memory macro, while the byte-wide interface and the loading path remain significant costs.

0.35

Straightforward Entropy-Sensitive Mergesort

cs.DS ·2026-08-11 ·Bill Jin, Alex Zihan Xu
similarity 0.46
Abstract · 21 pages, 15 pages main text, 4 pages appendix, 2 figures

In this paper, we present a stable mergesort variant, "directional mergesort", that to sort an array of $n$ elements makes no more than $nH+3n$ comparisons and $1.5nH+O(n)$ moves where $H$ is the run-based entropy of the input sequence, matching the best existing algorithms in run-adaptive sorting. However, our algorithm is surprisingly minimalistic: it leverages only skip checks, i.e., bypassing the merge step when both halves are already in order, and dynamically changing the direction of merging based on the state of the subarrays. As dynamic run scanning is avoided, all merge steps remain static and derivable from $n$, enabling a reduction to $O(1)$ words of stack space (i.e. space usage excluding the merge buffer) in "directional mergesort$^{++}$", thus improving over the predecessors' $O(\lg n)$ words. Importantly, as directional mergesort adapts only to non-decreasing runs, directional mergesort$^{++}$ also applies a parallel set of rules for (strictly) decreasing runs, allowing the algorithm to also adapt to decreasing runs whilst retaining the original comparison bounds.

0.10

FastHeapDict: Permanent Slot Indexing for Efficient Decrease-Key Operations in Indexed Priority Queues

cs.DS ·2026-10-30 ·Hojjat T. Goudarzi, Arash Torabi Goodarzi, Mohammad Amir Eshraghi
code/data similarity 0.46
Abstract · 9 pages, 8 figures. Preprint; Python and C++20 implementations. Source code and benchmark artifacts available at https://github.com/hojjatgo…

Efficient decrease-key support remains an important practical concern in priority queues used by shortest-path and graph-processing algorithms. Although duplicate-entry heaps avoid explicit decrease-key operations and are simple to implement, they may accumulate many stale entries when tentative priorities are repeatedly improved. This paper presents FastHeapDict, an indexed binary min-heap based on permanent slot indexing. Instead of repeatedly locating keys through hash-table lookups during heap repair, FastHeapDict assigns each key a stable integer slot and stores that slot directly in heap entries. As a result, position updates during sift-up and sift-down operations are performed through integer indexing while preserving the usual indexed-heap interface. We evaluate FastHeapDict in both Python and C++20 using Dijkstra's algorithm as the primary experimental workload. The benchmarks include constructed dense stress graphs, randomized dense graph variants, and comparisons against duplicate-entry heaps and existing priority-queue alternatives. Across the tested Python workloads, FastHeapDict consistently outperforms the duplicate-entry heapq baseline and the tested heapdict and pqdict implementations. In the C++20 implementation, FastHeapDict also achieves strong constant-factor improvements over std::priority_queue duplicates, std::set-based decrease-key, and std::multiset duplicates. These results indicate that permanent slot indexing can provide a compact and effective implementation strategy for indexed priority queues in workloads where priority updates are frequent.

0.40

Sorting in PRAM, Parallel Comparison Model and Parallel External Memory Model

cs.DS ·2026-11-03 ·Gopalan Sajith, Manas Kumar Panda, Ranajit Senko
similarity 0.46
Abstract

We study the problem of sorting on the Parallel Random Access Machine (PRAM), Parallel Comparison Model (PCM) and Parallel External Memory Model (PEM). On PRAM, we present a Concurrent Read Exclusive Write algorithm that runs in $O(\log n)$ time with $n$ processors; our algorithm is very different from Cole's Merge Sort. On PCM, we present the first optimal algorithm for sorting after AKS; our algorithm runs in $O(\log n/\logα)$ comparison rounds with $nα$ processors, for $1\leqα\leq n$. On PEM, we present a Concurrent Read Exclusive Write algorithm that sorts $N$ elements in $O\left(\log\frac{N}{B}\right)$ I/O rounds with $p\geq \frac{N}{B}$ processors.

0.24

AbacusGS: Gaussian Splatting without Per-Splat Sorting

cs.CV cs.GR ·2026-11-01 ·Jiacheng Ding, Yanliang Qi, Cong Guo, Peihua Mai
similarity 0.46
Abstract · 10 pages, 5 figures, 6 tables

3D Gaussian Splatting sorts every splat by depth in every frame. Viewers that draw splats with the hardware rasterizer and sort them on the CPU, as most web and mobile viewers do, spend most of the frame time in this sort. We present AbacusGS, which stores the blending order of a 3DGS scene in the scene layout. AbacusGS groups the splats into octree boxes of at most 128 splats and stores each box in order along an axis chosen at write time. In each frame, AbacusGS sorts only the visible boxes, and one dot product per box decides whether the box is read forward or backward. A short order-aware fine-tuning converts an existing 3DGS model, and the over operator of 3DGS stays unchanged. On 13 standard scenes, AbacusGS loses 0.13 dB PSNR on average against an equally fine-tuned 3DGS model. In an OpenGL viewer that orders splats on the CPU, AbacusGS renders frames 4.5 times faster than per-splat sorting. We also present a compact format of 17 bytes per splat and a CUDA tile renderer that use the same order. The code will be released.

0.22

FlagRot: Selective Rotation for Low-Bit KV Caches

cs.CL cs.AIcs.LG ·2026-11-02 ·Kunming Shao, Xijie Huang, Jierun Chen, Jiaqi Shao, Yanli Wang +5 more
code/data similarity 0.46
Abstract · 26 pages, 5 figures. Code: https://github.com/KunmingSHAO/FlagRot_releaser

Long-context inference is bound by the KV cache, which 2-bit codes could shrink about sixfold if their error stays in check. The usual remedy rotates keys before quantizing, assuming rotation always helps. However, we observe that it does not: rotation flattens a spiky piece of a key but can give a flat one a new peak, and both coexist within one key. We therefore propose FlagRot, which stores each 32-channel piece rotated or as is, whichever has the smaller calibrated attention error, and rotates the query instead when reading. We further show that how often to decide follows the quantization axis: per-channel caches such as KIVI need one decision per head, at no write cost, while per-token caches decide per key, with the choice stored in existing sign bits. At 2.5 bits per value, FlagRot lowers the twelve-model KL divergence of KIVI from 18.7 to 12.4 x 10^-3, below RotateKV on 9 of 12 models. Served as a vLLM plugin, it raises RULER at 128k tokens by +2.9 points and the LongBench v1 mean by +0.4 to +1.9 points on the three of four models where 2-bit KIVI loses accuracy. It also lowers the error of 4-bit integer and FP4 caches.

0.40