← All models

Opus 5.5 language bench

C++ (264ms)
C (264ms)
Zig (272ms)
Rust (275ms)
Swift (305ms)
C# (315ms)
Go (332ms)
Java (379ms)
Node.js (545ms)
Bun (590ms)
Python (5,810ms)

Times are the geometric mean of the language's median times over 90 tests, with the 9 data structures weighted equally.

Each data structure below was written by claude-opus-5-5 (effort high) from one prompt, once in every language, then tested and timed by the same harness. The ranking above combines all of them; pick a data structure to see every test, the generated code and how it was produced.

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.

Data structures

B-treeIn-memory B-tree (minimum degree 16) mapping i64 keys to i64 values.10 tests on 4,000,000 entriesFastest: Swift, C, RustAll results →Doubly linked listIn-memory doubly linked list of i64 values, one node per value, with constant-time insertion, removal and moves through node handles.10 tests on 3,000,000 entriesFastest: C, Zig, SwiftAll results →Hash mapIn-memory open-addressing hash map (linear probing, fixed hash, load factor 7/8) mapping i64 keys to i64 values.10 tests on 2,000,000 entriesFastest: C++, Rust, SwiftAll results →Binary heapIn-memory array-based binary min-heap (a priority queue) of entries with an i64 key and an i64 value.10 tests on 3,000,000 entriesFastest: C++, C, RustAll results →Radix treeIn-memory radix tree (a path-compressed trie) mapping byte-string keys to i64 values, with longest-prefix match, prefix counts and ordered prefix listings.10 tests on 1,500,000 entriesFastest: C#, Rust, C++All results →Red-black treeIn-memory red-black tree (one entry per node, balanced by recolouring and rotations) mapping i64 keys to i64 values.10 tests on 1,500,000 entriesFastest: Swift, C, C++All results →R-treeIn-memory Guttman R-tree (quadratic split, at most 16 and at least 6 entries per node) over two-dimensional integer rectangles with integer ids, answering window, point and nearest-neighbour queries.10 tests on 400,000 entriesFastest: Zig, C, C++All results →Skip listIn-memory skip list (Pugh's randomized skip list: one node per entry with a tower of forward links of random height) mapping i64 keys to i64 values.10 tests on 1,250,000 entriesFastest: C++, Zig, GoAll results →Union-findIn-memory disjoint-set forest (union-find) over the elements 0 .. n-1, with a union heuristic and path shortening.10 tests on 4,000,000 entriesFastest: C, Rust, C++All results →

Geometric mean time per data structure (ms)

Data structureCC++RustGoZigSwiftJavaC#Node.jsBunPython
B-tree2931.06×3611.31×3051.10×3071.11×3381.22×2771.00×4641.68×3141.13×6442.33×7092.56×4,58016.55×
Doubly linked list1771.00×1921.08×1931.09×2391.35×1831.03×1901.07×2431.37×2201.24×3722.10×9335.26×6,00133.85×
Hash map1541.03×1501.00×1511.00×2211.47×1541.02×1511.01×2021.34×1711.14×4492.98×6914.60×5,03033.47×
Binary heap2451.02×2391.00×2481.04×3411.42×2711.13×2791.17×4041.69×3461.45×7042.94×8553.57×8,84837.00×
Radix tree3631.07×3551.04×3491.02×3801.12×3931.15×3581.05×5341.57×3401.00×6591.94×4641.36×4,04411.88×
Red-black tree4081.15×4141.16×5481.54×4791.35×4331.22×3551.00×5251.48×5991.69×7712.17×7362.07×4,46012.56×
R-tree1581.09×1631.12×1681.16×2701.85×1461.00×6694.60×3262.24×2531.73×4473.07×3642.50×7,30450.14×
Skip list6721.38×4851.00×6191.27×5481.13×5241.08×5541.14×7121.47×6191.28×7471.54×6731.39×5,55811.45×
Union-find2021.00×2131.05×2061.02×3321.64×2471.22×2161.07×2721.35×2341.15×3321.64×2661.31×8,41941.61×
All (geometric mean)2641.00×2641.00×2751.04×3321.26×2721.03×3051.16×3791.44×3151.19×5452.07×5902.24×5,81022.04×

Ranking method