Improving Merge Sort and Quick Sort Performance by Utilizing Alphadev’s Sorting Networks as Base Cases

Anas Gamal Aly, Anders Jensen, Hala ElAarag · 2025

Recent work by Google DeepMind introduced assembly-optimized sorting networks that achieve faster performance for small fixed-size arrays (3-8). In this research, we investigate the integration of these networks as base cases in classical divide-and-conquer sorting algorithms, specifically Merge Sort and Quick Sort, to leverage these efficient sorting networks for small subarrays generated during the recursive process. We conducted benchmarks with 11 different optimization configurations and compared them to classical Merge Sort and Quick Sort. We tested the configurations with random, sorted and nearly sorted arrays.

Read the paper · More papers on PaperTik