Skip to main content
Version: 0.4

Xisto vs Go

15 Nov 2026, main f766bf8, on the Xeon. Go is a compiled language with a garbage collector and goroutines, the closest in spirit to what xisto does with TypeScript: native code, automatic memory, threads without ceremony.

Setup​

  • Go programs: every Go program of the official source package (BSD-3), not only the fastest, built as the site builds them by bench/benchmarksgame/go-build.sh: plain go build in one module with the third-party packages the programs import (github.com/ncw/gmp for pidigits, two PCRE bindings for regex-redux). Go 1.27.2, GOAMD64=v3 (the Xeon has AVX2, the same role as Rust's target-cpu=native). All 48 programs built.
  • PCRE: regex-redux #4 and #5 bind PCRE 1 through cgo, and Ubuntu 26.04 no longer ships it (libpcre3-dev is gone; only PCRE 2 is packaged). PCRE 8.45, its last release, was built from source (SHA-256 checked) with JIT into a local prefix and passed to cgo through CGO_CFLAGS, CGO_LDFLAGS and PKG_CONFIG_PATH.
  • xisto: every variant in bench/benchmarksgame/, built with XISTO_CPU=native; spectralnorm-8 is measured but not scored, as on Xisto vs Rust.
  • Command: python3 bench/benchmarksgame/langs.py 3 go=~/gobg/bin, scored with python3 bench/placar.py RESULTS go (see How every run is measured). The six problems without an input file ran first; the four that read the fasta output ran in a second round of the same build (*-run2.txt), and regex-redux again once PCRE was built (*-pcre.txt).
  • Steal during the first round: +219.

Go's programs use both cores too (goroutines), so time and CPU tell the same story here.

Xeon E5-2686 v4 (AWS t2.medium, 2 vCPUs, AVX2)​

Source: bench/results/bg-go-2026-11-15/go-ubuntu-xeon-2026-11-15-f766bf8.txt and …-f766bf8-run2.txt.

Xeon E5-2686 v4: Go's time ÷ Xisto's, per problem (above 1× Xisto is faster)
051015binary-trees11×mandelbrot5.41×regex-redux5.27×k-nucleotide5.14×fasta2.66×fannkuch-redux2.51×spectral-norm2.48×n-body1.49×pidigits1.43×reverse-complement1.22×

10 of 10 problems more than 3% faster in Xisto (accent); grey within 3% or slower. The dashed line is 1×, the same time. Every value is in the table below.

Xeon E5-2686 v4: Go's peak memory ÷ Xisto's, per problem (above 1× Xisto uses less)
110100reverse-complement22×mandelbrot4.55×fasta4.29×binary-trees2.69×fannkuch-redux2.17×regex-redux2.10×k-nucleotide2.02×pidigits1.92×spectral-norm1.04×n-body0.95×

Peak RSS of each run. Log scale.

problemxistoGoxisto timeGo timexisto CPUGo CPUxisto memGo memresult
binary-treesbinarytrees-3binarytrees_5 †1.538 s16.604 s2.99 s32.92 s114.3 MB307.2 MBwin
mandelbrotmandelbrot-6mandelbrot1.323 s7.155 s2.51 s14.03 s7.3 MB33.2 MBwin
regex-reduxregexredux-2regexredux_50.680 s3.582 s0.97 s5.27 s149.1 MB312.7 MBwin
k-nucleotideknucleotide-7 †knucleotide_61.357 s6.973 s2.65 s12.28 s70.4 MB142.2 MBwin
fastafastafasta_21.135 s3.021 s0.36 s4.44 s2.4 MB10.3 MBwin
fannkuch-reduxfannkuchredux-5fannkuchredux_36.815 s17.082 s13.49 s34.07 s2.4 MB5.2 MBwin
spectral-normspectralnorm-7spectralnorm_2 †0.453 s1.124 s0.90 s2.17 s2.3 MB2.4 MBwin
n-bodynbodynbody_82.451 s3.641 s2.45 s3.65 s2.0 MB1.9 MBwin
pidigitspidigitspidigits_40.628 s0.899 s0.63 s0.97 s2.6 MB5.0 MBwin
reverse-complementrevcomp-10revcomp0.838 s1.021 s0.24 s0.51 s11.0 MB245.1 MBwin

10 wins out of 10, from 1.2× (reverse-complement) to 10.8× (binary-trees), with less CPU on every row. xisto's peak memory is below Go's on 9 of 10; on n-body Go uses 1.9 MB against 2.0 MB. † Chosen for memory (up to 2% slower with at least 10% less memory, or up to 5% slower with at least 25% less).

The widest gaps are where Go's runtime does the work: binary-trees allocates hundreds of millions of short-lived nodes, which Go's collector traces while xisto frees a statement's temporary trees right after it in 8-byte nodes; mandelbrot and fannkuch-redux are SIMD in xisto (vector types in the generated C) and scalar in Go, whose compiler does not vectorize. Where both are plain scalar loops (n-body, pidigits on GMP) the gap is 1.4–1.5×.

regex-redux​

Go's fastest regex-redux programs call PCRE through cgo: #5 with PCRE's JIT takes 3.58 s, #4 17.5 s, and the two that use Go's own regexp package (which guarantees linear time) about 27.7 s. xisto's regexredux-2 takes 0.68 s, with the nine counts in a worker while the main thread does the replacements.

The xisto programs​

The variants and what each does are listed on Xisto vs Rust.

Result files​

  • bench/results/bg-go-2026-11-15/go-ubuntu-xeon-2026-11-15-f766bf8.txt (the six problems without input)
  • bench/results/bg-go-2026-11-15/go-ubuntu-xeon-2026-11-15-f766bf8-run2.txt (k-nucleotide, reverse-complement, regex-redux without PCRE, pidigits)
  • bench/results/bg-go-2026-11-15/go-ubuntu-xeon-2026-11-15-f766bf8-pcre.txt (regex-redux with PCRE 8.45)
  • bench/results/bg-go-2026-11-15/go-build-ubuntu-xeon-2026-11-15.txt (the build log)