Times are the geometric mean of the language's median times over the 10 tests.
In-memory doubly linked list of i64 values, one node per value, with constant-time insertion, removal and moves through node handles. Every implementation on this page was written by an AI model from the same prompt, then tested and timed by the same harness.
Results: claude-opus-5-5_high
While writing these solutions the agents could run only the correctness tests (the same workloads at up to 100,000 entries, a few seconds per run). They could not run the timed workloads, time anything, or run any other program, so nothing here was tuned against the benchmark.
Entries n = 3,000,000
Samples 2 per cell (1 process × 2 timed repetitions, after 1 warm-up in each process)
Measured 2026-11-23 08:22 UTC-07:00
Machine Apple M3, 8 cores, 16 GB, macOS 27.0.1
Model was told 10,000,000 entries on Apple M4 Max (arm64), 36 GB (not what was measured)
Benchmark run time 10m 20s (C 0m 11s, C++ 0m 12s, Rust 0m 12s, Go 0m 14s, Zig 0m 12s, Swift 0m 12s, Java 0m 15s, C# 0m 13s, Node.js 0m 41s, Bun 1m 07s, Python 6m 52s)
Median time per case (ms)
Case
C
C++
Rust
Go
Zig
Swift
Java
C#
Node.js
Bun
Python
Append
1311.04×
1271.01×
1261.00×
1961.56×
1371.09×
1481.18×
2251.79×
2171.73×
3122.48×
1,40911.21×
5,39842.93×
Insert, random
1531.00×
2031.32×
2121.38×
3642.37×
1751.14×
1701.11×
3972.59×
2801.82×
4502.94×
8235.36×
4,98732.51×
Traverse, scattered
3601.01×
3801.07×
3591.01×
3671.03×
3721.05×
3581.01×
3751.05×
3561.00×
3761.06×
4621.30×
2,5377.13×
Traverse, in order
2361.78×
2301.74×
2341.77×
2672.01×
2311.74×
2281.72×
1321.00×
2171.64×
2121.60×
2,91622.02×
9,32170.38×
Remove, random
1111.00×
1111.00×
1151.04×
2211.99×
1121.01×
1461.32×
3232.91×
1581.42×
3663.30×
1,0549.50×
10,43093.99×
Move to front
1641.01×
1631.00×
1641.01×
2261.38×
1641.01×
1811.11×
1941.19×
1951.20×
2941.80×
2631.62×
7,16844.02×
Queue
1931.21×
1931.22×
2011.27×
1991.26×
1991.25×
2041.29×
1581.00×
1971.25×
5743.62×
2,03112.82×
10,49466.22×
Josephus
2061.00×
2071.01×
2061.00×
2261.10×
2091.02×
2101.02×
2521.23×
2221.08×
3111.51×
5102.48×
3,86818.82×
Both ends
1641.29×
2531.99×
2221.75×
1271.00×
1661.31×
1651.30×
1371.08×
1461.15×
4043.18×
1,0838.53×
5,75645.35×
Mixed
1511.00×
1651.09×
1881.24×
3102.05×
1591.05×
1631.08×
4713.12×
2861.89×
5783.83×
1,0236.77×
5,44836.08×
Overall (geometric mean)
1771.00×
1921.08×
1931.09×
2391.35×
1831.03×
1901.07×
2431.37×
2201.24×
3722.10×
9335.26×
6,00133.85×
Median time per case, log scale (ms)
AppendInsert, randomTraverse, scatteredTraverse, in orderRemove, randomMove to frontQueueJosephusBoth endsMixed
20n appends: 20 times, n elements are appended to an empty list.
Insert, random
4n inserts: 4 times, a list of n elements is built by inserting every element immediately before or after a random element that is already there.
Traverse, scattered
2n steps: one walk from front to back and one from back to front over a list of n elements whose order is unrelated to the order in which its nodes were created, reading every value.
Traverse, in order
48n steps: 24 walks in each direction over a list of n elements that was built by appending, reading every value.
Remove, random
6n removes: 6 rounds that each remove all n elements of a list in random order. A new list is built for every round, untimed.
Move to front
6n moves (6 passes over n random picks) of a random element to the front of a scattered list of n elements, as a least-recently-used cache does on every access.
Queue
32n operations on a first-in, first-out queue that holds n/8 elements: 16n times, append one element and remove the first.
Josephus
6n removes: 6 rounds of walking round and round a list of n elements, removing every third one until none is left. A new list is built for every round, untimed.
Both ends
16n operations: 8 rounds that each add n elements alternately at the back and at the front of an empty list, then remove them all alternately from the front and from the back.
Mixed
3n operations on random elements of a list of n elements: 30% insert after, 10% insert before, 30% remove, 20% get, 10% move to front.
Method
Each language has a benchmark-owned driver (a line-for-line port of one canonical driver, in lang/) that calls the model-written data structure. The model does not write or control any timing code.
The driver times only the loop of operations, with an in-process monotonic clock. Process and runtime start-up, workload generation, pre-populating the structure, and verification are outside the timed region.
Every process runs a discarded warm-up repetition first (which is when a JIT compiles the hot code), then the timed repetitions, each on a freshly built structure. The number of processes and repetitions is the same for every language. Garbage-collected runtimes get one explicit collection before the timer starts; collections during the timed loop are counted.
Every repetition's results are checked against a reference, so a time is only reported for a correct run.
A language's overall score is the geometric mean of its median times over all cases. Unlike a total, that gives every case the same weight however long it runs, and being twice as slow on any one case costs the same. A language is only ranked if it completed every case.
All languages are compiled with fixed optimising flags and run single-threaded; see the README for the exact commands.