Sorting networks provide constant-time sorting by using a fixed comparison schedule independent of input data, eliminating timing side-channel vulnerabilities critical for cryptographic applications. Batcher's bitonic sort achieves O(n log²n) complexity with data-oblivious execution, while djbsort implements this using SIMD

14m read time From 00f.net
Post cover image
Table of contents
Why sorting leaks informationSorting networksBubble sort as a sorting networkOdd-even transposition sortBitonic sequencesBatcher’s bitonic sortdjbsortA Zig implementationFloat ordering

Sort: