Silicon Logic
SL · /sorting · 26.05
§ 15 · Instrument Filed 2026.05 · Reference SL · 26 · 015

Big-O you can hear.

Nine classic sorting algorithms, one input array, one starting gun. Each panel is the same data viewed through a different procedure. The audio is the gimmick: every comparison ticks, every swap rings a soft tone keyed to the value moved — bubble sort sounds like rain, merge sort lands as a chord. Mute is prominent; the audio is polarising on purpose.

Array size
Distribution
Pace
Audio
Run
Reset

Reading the race

§ 02 · Notes
Bubble
O(n²). Adjacent swaps; the largest unsorted value bubbles to the end each pass. Sounds like rain because nearly every step is a tiny comparison click.
Insertion
O(n²), but O(n) on nearly-sorted input — pick the "Nearly sorted" distribution and watch it land first.
Selection
O(n²) comparisons, only O(n) swaps. Steady scanning, very quiet on the swap channel.
Shell
O(n1.3)-ish in practice. Insertion sort over shrinking gaps. The first wide passes look like instant order.
Heap
O(n log n). Builds a max-heap, then repeatedly pulls the root to the back — the right edge of the bar chart grows sorted while the left stays a heap.
Merge
O(n log n). Bottom-up: width 1, 2, 4… each pass produces visibly longer runs of order. The chord at the end is the rewrite into the array.
Quick
O(n log n) average, O(n²) worst. Lomuto partition with the last element as pivot — try "Reversed" to provoke its bad case.
Radix
O(nk), k = digit count. Not comparison-based: distributes by decimal digit. Looks like clouds rearranging.
Timsort
O(n log n). Insertion sort within 32-element runs, then bottom-up merges — what Python and many JVMs ship.

Method

§ 03 · How the race is fair
Same start
All nine algorithms receive the same input array. Every step button or reset replaces the seed and starts a new race.
Equal step rate
Each algorithm executes the same number of operations per frame (scaled by Pace). The one with fewer total operations finishes sooner — that's how Big-O turns into wall-clock time here.
What counts
Comparisons are the "click" channel. Writes (swaps or assignments) are the "tone" channel — the tone's pitch follows the value being moved.
No accounts, no calls home
One HTML file. Audio synthesised in your browser via Web Audio API. Nothing leaves the device. Read the source.