Performance
On this page
This page collects the measurements of Xo against Go that each release records. Every number links to the results file in the repository where it was measured, with the host, the Go version and the raw output. Rows where Xo is slower or uses more memory are listed as plainly as the rows where it is faster.
The numbers here are from 0.55.0 on the linux/arm64 timing host (12
CPUs): the release benchmarks
(release-vs-go-v0.55.0-linux-arm64-run.md), compile time, build memory, binary size and
std’s tests
(release-vs-go-v0.55.0-linux-arm64.md) and the HTTP server against
Go at its defaults and tuned
(release-vs-go-v0.55.0-linux-arm64-http.md), all with the published
release archive; and the survey of every bench/perf case at 0.55.0
(xo-vs-go-survey-2026-11-21.md).
Go is go1.26.11 for the 0.55.0 rows.
Last verified: 2026-11-22.
How to read the ratios
- A ratio is Xo over Go: below 1 means Xo took less time (or memory), above 1 means Xo took more.
- Run rows come from
xo bench --ab, which runs the two programs alternately, A = Go and B = Xo, takes the median of each metric over the rounds, and reports B / A with a 95% interval and a verdict (better, worse or within noise). A ratio is only called a difference when its interval excludes 1. - HTTP rows are medians over rounds of a load generator on the same host, the server on six CPUs and the load generator on the other six.
Run time: the release benchmarks
xo bench --ab, 3 rounds, Go as A and Xo as B, each pair running its
work enough times (REPEAT, in each row’s heading) that the faster side
takes about a second
(release-vs-go-v0.55.0-linux-arm64-run.md lines 29-333).
Wall time and peak memory (max RSS), Xo over Go:
| workload | wall | max RSS |
|---|---|---|
| fib | 0.885 | 0.206 |
| sieve | 1.35 (slower) | 0.382 |
| nbody | 1.007 (slower) | 0.206 |
| sort | 0.758 | 0.18 |
| interp | 0.303 | 0.206 |
| collatz | 0.995 | 0.207 |
| strings | 0.261 | 0.994 (even) |
| coll putget | 0.48 | 0.77 |
| coll get | 0.488 | 0.669 |
| coll push | 0.598 | 0.273 |
| coll update | 0.5 | 0.698 |
| coll iter | 0.076 | 0.67 |
| coll copymut | 0.428 | 0.427 |
| coll branch | 0.001 | 0.083 |
| conc spawn | 0.298 | 0.203 |
| conc fanout | 0.467 | 0.235 |
| conc pingpong | 0.929 | 0.164 |
| conc mutex | 0.319 | 0.17 |
| conc rwmutex | 7.913 (slower) | 0.254 |
| conc pmap | 1.023 (slower) | 0.222 |
- Four rows are slower than Go: sieve 1.35 (1.236 to 1.402), nbody
1.007 (1.003 to 1.008), rwmutex 7.913 (7.784 to 8.0) and pmap 1.023
(1.016 to 1.033). Every row is long enough for
xo benchto judge. rwmutex is the largest gap on this page: readers and writers contending on one lock take about 8 times Go’s time. - coll branch (0.001) is not a typical speedup. The workload copies a
map 2,000 times and adds one key to each copy. Xo’s collections are
values with structural sharing, so a copy is cheap and only the changed
part is written, where Go’s twin calls
maps.Clonefor each copy. It shows what that representation saves on this pattern, not how fast Xo code is in general. - Peak memory is lower on every row but strings (0.994, within noise): 0.083 to 0.77 of Go’s.
Test time: std’s tests against Go’s
xo test --std-module of the base64 and json ports against go test of
the Go packages they were ported from, cold (every cache emptied) and
after an edit (one function appended to the module under test), 3 rounds
(lines 424-502):
| test | wall | max RSS |
|---|---|---|
| base64 cold | 0.814 | 2.069 (more) |
| base64 edit | 0.605 | 1.472 (more) |
| json cold | 0.447 | 2.15 (more) |
| json edit | 0.341 | 1.8 (more) |
The edit rows are a rerun: the first run’s edit rows tested the unedited std, through a bench bug since fixed (lines 430-436).
HTTP server: Go at its defaults and tuned
The same JSON server in both languages (bench/perf/jitter), 12 rounds a
row
(release-vs-go-v0.55.0-linux-arm64-http.md lines 25-50).
Go is measured twice: at its defaults (GOGC=100), and tuned with
GOGC=off GOMEMLIMIT=1GiB, which trades memory for fewer collections.
/alloc builds and encodes a JSON object per request; /hello writes a
fixed body. cN is the number of connections.
| row | server | req/s | p99 µs | CPU µs/req | peak RSS KB |
|---|---|---|---|---|---|
| /alloc c32 | Xo | 172,589 | 438 | 33.2 | 4,388 |
| /alloc c32 | Go | 28,262 | 5,452 | 118.3 | 19,948 |
| /alloc c32 | Go tuned | 132,220 | 679 | 42.9 | 1,012,888 |
| /alloc c256 | Xo | 186,712 | 3,282 | 32.0 | 10,716 |
| /alloc c256 | Go | 57,217 | 37,685 | 81.9 | 40,308 |
| /alloc c256 | Go tuned | 139,411 | 5,962 | 41.9 | 1,015,520 |
| /hello c32 | Xo | 364,054 | 227 | 7.7 | 3,182 |
| /hello c32 | Go | 273,557 | 637 | 12.5 | 17,780 |
| /hello c32 | Go tuned | 306,382 | 276 | 11.6 | 986,248 |
| /hello c256 | Xo | 883,072 | 873 | 6.5 | 6,742 |
| /hello c256 | Go | 479,421 | 2,664 | 10.2 | 24,044 |
| /hello c256 | Go tuned | 710,194 | 1,162 | 8.0 | 986,196 |
Xo over Go, requests a second (lines 52-69):
| row | over Go | over Go tuned |
|---|---|---|
| /alloc c32 | 6.107 | 1.305 |
| /alloc c256 | 3.263 | 1.339 |
| /hello c32 | 1.331 | 1.188 |
| /hello c256 | 1.842 | 1.243 |
- Go’s default
/allocrow is weak because its collector runs many times a second on this server’s small live heap (GOGC=100). Compare with the tuned column for Go’s best case: Xo serves 1.31 to 1.34 times its rate on/alloc, at 0.004 (c32) and 0.011 (c256) of its peak memory. - At fixed open loop rates (10,000 and 20,000 requests a second, 64 connections) all three serve the rate; Xo’s p99 is 116 and 140 µs, Go’s 389 and 779 µs, tuned Go’s 128 and 157 µs (lines 31-38).
Compile time, binary size and build memory
Xo 0.55.0 against Go 1.26.11 on linux/arm64, one build each, wall
milliseconds and the build’s peak resident memory, each tool with its
default caches (Go’s build cache; Xo’s back-end caches and its run cache)
(release-vs-go-v0.55.0-linux-arm64.md lines 22-48).
Cold empties every cache; warm is the third unchanged build; edit is a
build after one function is appended. The like-for-like row is coll,
one program on each side:
| cold ms | warm ms | after an edit ms | peak MB cold / warm / edit | binary MB | |
|---|---|---|---|---|---|
| Go | 1380 | 20 | 81 | 299 / 23 / 70 | 2.31 |
| Xo | 1298 | 11 | 96 | 404 / 13 / 76 | 2.62 |
- Cold builds take about as long as Go’s (1218 to 1396 ms for the Xo programs, 1340 to 1380 ms for Go’s three) but peak higher: 392 to 432 MB against Go’s 290 to 313 MB.
- Unchanged rebuilds take 8 to 21 ms and 13 MB, against Go’s 18 to 20 ms and 21 to 24 MB: Xo’s run cache answers them. The second build after a cold one is slower (62 to 115 ms): it is the first that compiles against std’s precompiled variants, which the cold build starts in the background.
- After an edit, Xo takes 59 to 96 ms against Go’s 70 to 81 ms:
faster on some programs, slower on others (
coll96 against 81). - Binaries are larger than Go’s: 2.51 to 2.64 MB against Go’s 2.30 to 2.31 MB.
- A large program (0.55.0, on the Mac): a program linking the Azure compute client (armcompute) against Go’s armcompute v9.0.0 (release-vs-go-v0.55.0.md lines 122-127): cold 816 ms and 481 MB against Go’s 4766 ms and 920 MB (with std’s variants already built; 2709 ms and 859 MB for the first program after install), warm 51 ms against 102, an edit 235 ms against 331, binary 7.99 MB against 9.30.
Where Xo is behind or even
The four slower run rows above: sieve, nbody, rwmutex and pmap.
Cold build memory and binary size, above: both are above Go’s.
Warm rebuilds with the run cache off: a diagnostic, not the default:
collthen rebuilds unchanged in 78 ms at 76 MB against Go’s 20 ms at 23 MB (lines 49-71): the front end still reads std’s declarations and checks the program’s modules on every build.Test builds use more memory:
xo testof the base64 and json ports takes 0.341 to 0.814 ofgo test’s wall time, but 2.069 and 2.15 times its peak memory cold and 1.472 and 1.8 times after an edit The peak is the compiler’s own heap, not the test binary: parse trees of std’s declarations, and every std module that imports the edited one checked again. At the front end’s peak in a build ofcoll, decoding std’s parse trees holds 40.92% of the 114.44MB in use on linux/arm64 (release-vs-go-v0.55.0-linux-arm64.md lines 503-527) and 41.97% of the 112.58MB in use on the Mac (release-vs-go-v0.55.0.md lines 348-372).Standard library ports still slower than Go’s packages in the 0.55.0 survey of 642 cases (geometric mean 0.704; 34 of the 492 cases that run 5 ms or more are more than 10% slower; lines 30-56). The largest gaps:
- ordered comparison of strings and bytes (
ordcmp): 2.46 and 2.43 times Go; - integer formatting (
strconv/itoa): 1.50 times Go; - AES block modes, the sieve, trimming characters and CSV formatting: 1.29 to 1.41 times Go.
The 2026-11-07 survey’s largest gaps (time layouts, metrics, logging below the level) are now faster than Go;
jsontoken/writeis still 1.135 times Go (lines 58-73).Each fix is logged with its timing in the module’s change log.
- ordered comparison of strings and bytes (
Method
- Host: every row on this page but the large program (the Mac) ran on the linux/arm64 timing host (Linux aarch64, 12 CPUs, 39 GB); the HTTP rows put the server on CPUs 0 to 5 and the load generator on 6 to 11.
- Go: go1.26.11.
- Rounds: 3 per row for the release benchmarks and std’s tests, 12 for the HTTP rows (3 at each of four code alignments), 5 per case for the survey (alternating, medians of wall time).
- Ratios: Xo’s median over Go’s median for the same metric.
xo bench --abalso prints the 95% interval and calls a row better or worse only when the interval excludes 1. Run it yourself withxo bench --ab A Bon two built programs (see the toolchain reference). - Scripts:
scripts/release-vs-go.sh(run, compile, test, HTTP),scripts/release-vs-go-http.sh(both Go columns) andscripts/twincheck -time(the survey), all in the repository. - This page is refreshed with each release’s run.