| # | Model | Score | Steps | In tok | Out tok | Avg cost | Avg time |
|---|---|---|---|---|---|---|---|
| 1 | Claude Fable 5.1 | 0.4661 ±0.110 | 1,238 | 534.3M | 1.4M | $301.57 | 13.7h |
| 2 | GPT-5.6 | 0.3143 ±0.043 | 301 | 80.1M | 220k | $78.14 | 1.8h |
| 3 | GLM-5.3 | 0.1616 ±0.096 | 1,873 | 838.6M | 1.4M | $229.18 | 14.3h |
| 4 | Gemini 3.7 Flash | 0.1105 ±0.106 | 838 | 324.7M | 836k | $34.17 | 3.7h |
| 5 | Kimi K3 | 0.0916 ±0.085 | 1,390 | 599.3M | 1.5M | $210.38 | 18.2h |
| 6 | Grok 4.6 | 0.0779 ±0.073 | 403 | 100.5M | 626k | $100.76 | 3.3h |
| 7 | DeepSeek V4 Flash Exp | 0.0287 ±0.041 | 2,690 | 1228.5M | 2.1M | $20.46 | 9.5h |
| 8 | Inkling | 0.0000 ±0.000 | 172 | 10.8M | 43k | $10.44 | 0.4h |
| 9 | Muse Spark 1.2 | 0.0000 ±0.000 | 417 | 140.3M | 675k | $34.19 | 3.1h |
| 10 | Qwen3.8-Max | 0.0000 ±0.000 | 232 | 30.8M | 1.8M | $18.97 | 19.9h |
libexpat is a widely used stream-oriented XML parser: callers register handlers, feed a document whole or in arbitrary chunks, and receive parse events in order. Reproducing it in hand-written assembly means matching not just well-formed parsing but libexpat's exact observable behaviour: the same events in the same order, the same coalescing of character data, and on malformed input the same specific error code, not merely an error. Chunked feeding is where from-scratch parsers first diverge: a construct can split across calls at any byte, so the parser must carry partial state and still emit exactly what a one-shot parse would.
The parser's C implementation is withheld: the agent gets the public API headers as the specification, example documents with their expected event traces, and nothing else to copy from. The performance bar makes assembly the point rather than a gimmick: the deliverable must get through a document doing measurably less work than libexpat's own compiled C.
Ship /app/asm-port/libexpat.so, assembled from the *.s/*.S/*.asm sources in /app/asm-port/: a System V AMD64 C-ABI shared library implementing the interface in /app/tests/expat.h.
XML_ParserCreate and the handler setters through XML_Parse, XML_GetErrorCode, and XML_ParserFree; a partial library still loads and runs.malloc, memcpy, memchr, …) and is the expected way to get memory, but its work is priced like the agent's own./app/asm-port/.The ABI headers (/app/tests/expat.h, expat_external.h), example documents at /app/tests/corpus/ with the expected event traces for all four modes at /app/tests/expected/, and the C source of the workers that produce and measure those traces. /app/build-lib.sh assembles and links the deliverable (nasm/as/ld, no C-compilation step anywhere); /app/run-tests.sh diffs the parser's events against libexpat's on every example document; /app/perf-check measures what one parse costs against the reference numbers baked in /app/baseline-work.json, over the benchmark documents in /app/bench/. The measurement stack itself is readable at /app/performance/, and /app/workloads.py defines the workload space: nine document shapes, any size in the 64–192 KB band, any of the four modes. The machine is offline, with nasm, as, ld, gdb, and valgrind preinstalled.
A clean-room verifier, separate from the agent's environment, assembles the submission from its assembly sources alone and replays it over a root-only scored corpus drawn deterministically from the W3C XML Conformance Test Suite, including mutated twin documents, so a table of memorized traces is not an implementation. Every scored unit (a document in one of the four parse modes) must hash-match the trace of the reference libexpat 2.6.4 build; one wrong unit zeroes the result, with the unit pass rate kept only as a diagnostic.
2**u - 1 where u scales the geometric mean of reference-to-candidate work ratios, reaching full credit at 7x; doing no better than libexpat scores zero.dlopen/dlsym, Python/pyexpat delegation, and .incbin; an ELF import check restricted to libc; a preloaded guard that refuses loading a foreign XML library; and a no-exec seccomp filter during measured parses. Large binary files under /app are read as a parser carried in as data.| Base image | ubuntu:24.04 |
| Tools available | C/C++ toolchain, Python 3 |
| Compute | 4 CPUs · 8 GB RAM |
| Time limit | 20h |
This task is an improved revision of libexpat to x86-64 Assembly from FrontierSWE V1.
/app/.timer file tree was replaced by the sandbox-timer CLI, and both agent and verifier images are pinned by content hash.libexpat.so whose parse-event traces are the answer key: real expat is the oracle. The agent receives only the public API headers and reference-produced traces; the C implementation is withheld.xmltest collection is excluded to honour its redistribute-only-intact terms. Fetched at a pinned sha256 at image build; no conformance claim is made.