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: gemini-4-neon_high
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 21:36 UTC-07:00
Machine Apple M3, 8 cores, 16 GB, macOS 27.0.1
Model was told 3,000,000 entries on Apple M3 (arm64), 16 GB (as measured)
Benchmark run time 10m 05s (C 0m 10s, C++ 0m 11s, Rust 0m 11s, Go 0m 13s, Zig 0m 11s, Swift 0m 11s, Java 0m 15s, C# 0m 13s, Node.js 0m 41s, Bun 1m 08s, Python 6m 44s)
Median time per case (ms)
Case
C
C++
Rust
Go
Zig
Swift
Java
C#
Node.js
Bun
Python
Append
1391.15×
1621.34×
1601.33×
1891.56×
1641.36×
1211.00×
2061.71×
1631.35×
2822.34×
1,35711.23×
4,53637.55×
Insert, random
1511.00×
1981.31×
1831.21×
2951.95×
1721.14×
1631.08×
3432.27×
2531.68×
5373.56×
7875.21×
5,07533.59×
Traverse, scattered
3641.03×
3661.03×
3551.00×
3611.02×
3621.02×
3641.02×
3691.04×
3621.02×
3821.08×
4641.31×
2,5567.20×
Traverse, in order
1661.57×
2061.95×
1651.57×
2262.14×
1951.85×
1941.84×
1051.00×
2552.42×
2051.95×
2,90527.59×
9,37389.01×
Remove, random
1051.00×
1101.05×
1071.02×
1521.45×
1081.03×
1241.18×
4304.10×
1501.43×
3553.38×
1,0389.88×
10,19397.09×
Move to front
1621.01×
1631.01×
1631.01×
2261.40×
1621.00×
1771.10×
2031.26×
1941.20×
2771.72×
2621.62×
7,17144.39×
Queue
1291.58×
81.41.00×
96.81.19×
1642.02×
87.91.08×
1241.52×
1491.83×
1461.80×
6227.64×
2,04425.11×
9,661118.70×
Josephus
1921.01×
2071.09×
1961.03×
2031.07×
1901.00×
1901.00×
2281.20×
2301.22×
3131.65×
5062.66×
3,76719.86×
Both ends
65.51.01×
88.01.36×
77.51.20×
1081.67×
64.81.00×
69.91.08×
1051.63×
1051.62×
3214.96×
1,05016.21×
5,11879.00×
Mixed
1441.00×
1671.16×
1751.22×
2481.73×
1471.02×
1581.09×
4092.84×
2872.00×
6154.27×
9376.51×
5,48038.07×
Overall (geometric mean)
1481.00×
1601.08×
1541.04×
2061.39×
1491.01×
1551.05×
2261.53×
2021.36×
3682.48×
9126.16×
5,77339.01×
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.