Skip to main content
Version: 0.4

PolyBench: Xisto vs Rust and Go

14 Nov 2026, main 40cdc16, on the two AWS VMs. PolyBench/C 4.2.1 is 30 numerical kernels (linear algebra, solvers, stencils, data mining, dynamic programming) used by compiler researchers to test loop optimizations. The Benchmarks Game measures programs; PolyBench measures the compiler.

Setup​

  • Dataset: LARGE, for every kernel.
  • Xisto: each kernel ported to TypeScript with the same loops in the same order, arrays as number[][] (deriche uses Float32Array, as the C uses float). Source: bench/polybench/ts.
  • Rust: the community port polybench-rs (contiguous fixed-size arrays), release build, -C target-cpu=native.
  • Go: there is no community port; a line-by-line transliteration of the C, reviewed against it (bench/polybench/go).
  • C: the original PolyBench/C compiled with clang 21 -O3 -march=native, a reference only, not a contestant.
  • Same arithmetic: no fused multiply-add on any side (-ffp-contract=off), so every side computes the same doubles. Every run's array dump is hashed and compared with the C reference's: all match.
  • Time: the kernel timer (PolyBench's own polybench_timer, the same region in every port), median of 3 runs; kernels under 50 ms take the median of 10. A tie is within 3%.
  • Machines: Xeon E5-2686 v4 (Broadwell, 2 vCPU) and Graviton2 (Neoverse N1, 2 vCPU). The VMs vary up to ±10% between runs, so every close result was re-measured with the sides interleaved in one invocation.

Score​

One page per contestant, with kernel time, CPU and memory per kernel and the C reference beside them: Xisto vs Rust, Xisto vs Go, Xisto vs Node, Xisto vs Bun. Node and Bun run the very same .ts files Xisto compiles: Xisto wins all 30 kernels against both on both VMs (15 Nov), 3× to 33× faster than Node and 1.4× to 25× faster than Bun.

machineXisto winstieslosses
Xeon (x86-64)2190
Graviton2 (ARM)2190

Four kernels came out close in the round and were re-measured with the four sides interleaved in one invocation (marked ² in the tables, which show the interleaved times): on the Xeon fdtd-2d (1.62 s vs Rust 1.64 s), atax and durbin (8 ms and 4 ms on Xisto and Rust, at the timer's millisecond resolution); on the Graviton2 gemm (633 ms vs Rust 630 ms). All four are ties.

Since the previous round​

kernelmachinebefore¹nowRustwhat changed
floyd-warshallGraviton225.0 s14.0 s23.7 spath[i][k] read once before the j loop, which then vectorizes
floyd-warshallXeon18.8 s10.5 s18.8 sthe same
heat-3dXeon2.17 s1.79 s2.00 sthe two sweeps of a time step fused one plane and one row apart
jacobi-2dXeon1.51 s1.24 s1.41 sthe same fusion for two-dimensional stencils, one row apart
symmGraviton25.08 s4.25 s4.52 srows on 64-byte lines and two columns jammed instead of sixteen

¹ The round of main 9a6c2d3 (bench/results/polybench-2026-11-14/*-9a6c2d3.txt).

  • floyd-warshall: at j = k the loop writes min(path[i][k], path[i][k] + path[k][k]); when path[k][k] >= 0 that writes the same value, so path[i][k] is read once before the j loop (checked once per entry, with the rows apart; otherwise the loop runs as written).
  • heat-3d and jacobi-2d (x86 only): row c of the second sweep's input is ready once row c+1 of the first sweep is written, so the compiler interleaves them; each element keeps its expression and operands, so the bits are the same, and the rows in use stay in the L2 cache.
  • symm (ARM Linux only): with sixteen rows read at once from arbitrary heap offsets, its time moved by 12% with the heap's layout alone (one more command-line argument shifted it); rows on 64-byte lines and a jam of two columns make it steady and faster.

Xisto loses no kernel on either machine.

Why Xisto wins most of them​

The Xisto compiler proves the loops' indices in range once per loop (with a fallback to the loop as written), and then applies loop transformations that a C compiler does not do on its own: unroll-and-jam of matrix products (several output columns per pass, held in registers), skewed Gauss-Seidel (seidel-2d: 12 rows at a time), lanes for recurrences (adi, deriche), selection reductions with several chains (nussinov), and a stencil nest with the row pointers in a table. Every transformation keeps the order of every floating-point operation, which is why the hashes match the C's bit for bit. On ARM Linux the runtime also places matrix rows an odd number of cache lines apart, so the Neoverse N1's stride prefetcher can follow a column (adi 13.5 s before it, 10.35 s in this round).

Results (kernel time)​

The fastest of Xisto, Rust and Go in bold. ² re-measured interleaved (see above).

Xeon E5-2686 v4 (x86-64)​

kernelC (ref.)XistoRustGoXisto vs best
2mm2.73 s620 ms2.67 s5.84 swin
3mm4.28 s1.04 s4.07 s9.51 swin
adi12.44 s6.28 s14.03 s15.72 swin
atax²7 ms8 ms8 ms18 mstie
bicg14 ms7 ms7 ms14 mstie
cholesky2.00 s1.98 s2.00 s4.43 stie
correlation7.19 s724 ms7.26 s6.96 swin
covariance7.19 s742 ms7.31 s7.05 swin
deriche463 ms165 ms401 ms470 mswin
doitgen740 ms97 ms524 ms1.66 swin
durbin²4 ms4 ms4 ms5 mstie
fdtd-2d²1.63 s1.62 s1.64 s3.98 stie
floyd-warshall18.10 s10.46 s18.75 s37.13 swin
gemm444 ms434 ms422 ms1.16 stie
gemver29 ms10 ms29 ms44 mswin
gesummv6 ms3 ms3 ms6 mstie
gramschmidt7.21 s1.40 s7.35 s6.37 swin
heat-3d1.88 s1.79 s2.00 s6.75 swin
jacobi-1d1 ms1 ms1 ms3 mstie
jacobi-2d1.30 s1.24 s1.41 s3.91 swin
lu5.50 s2.10 s5.57 s10.31 swin
ludcmp5.24 s2.23 s5.46 s5.91 swin
mvt25 ms6 ms25 ms35 mswin
nussinov4.13 s4.08 s4.58 s9.26 swin
seidel-2d27.68 s4.85 s27.67 s31.38 swin
symm1.98 s1.12 s2.21 s2.74 swin
syr2k4.24 s1.07 s4.04 s4.26 swin
syrk648 ms553 ms642 ms1.06 swin
trisolv3 ms4 ms4 ms7 mstie
trmm1.79 s275 ms1.80 s2.34 swin

Graviton2 (Neoverse N1, ARM)​

kernelC (ref.)XistoRustGoXisto vs best
2mm6.21 s1.68 s5.32 s9.58 swin
3mm10.11 s2.97 s7.27 s17.44 swin
adi12.12 s10.35 s11.42 s15.64 swin
atax6 ms6 ms6 ms19 mstie
bicg14 ms4 ms4 ms15 mstie
cholesky1.88 s1.58 s1.97 s4.47 swin
correlation7.55 s2.06 s7.11 s7.75 swin
covariance7.43 s2.05 s7.13 s7.75 swin
deriche330 ms195 ms287 ms364 mswin
doitgen657 ms209 ms523 ms1.61 swin
durbin3 ms3 ms3 ms6 mstie
fdtd-2d1.78 s1.90 s1.94 s4.76 stie
floyd-warshall23.08 s14.01 s23.73 s60.72 swin
gemm²642 ms633 ms630 ms4.83 stie
gemver39 ms20 ms37 ms51 mswin
gesummv6 ms2 ms2 ms6 mstie
gramschmidt13.25 s2.61 s15.57 s13.80 swin
heat-3d3.50 s3.66 s3.98 s8.84 swin
jacobi-1d1 ms1 ms1 ms4 mstie
jacobi-2d1.96 s1.96 s1.92 s5.89 stie
lu12.41 s5.22 s13.90 s14.10 swin
ludcmp10.48 s5.16 s10.65 s8.76 swin
mvt35 ms13 ms24 ms38 mswin
nussinov9.91 s7.72 s10.38 s17.80 swin
seidel-2d20.61 s6.86 s20.55 s24.45 swin
symm4.58 s4.25 s4.52 s5.31 swin
syr2k5.98 s2.74 s6.33 s6.71 swin
syrk2.02 s1.06 s1.90 s3.25 swin
trisolv3 ms3 ms3 ms7 mstie
trmm3.90 s650 ms3.95 s4.43 swin

The same rows with CPU and memory: Xisto vs Rust, Xisto vs Go. Raw output (this round: *-40cdc16.txt), the A/B against the Benchmarks Game and the interleaved re-measurements: bench/results/polybench-2026-11-14.

Reproduce​

POLYBENCH_SRC=/path/to/PolyBenchC-4.2.1 python3 bench/polybench/run.py 3 c xisto rust go --dataset LARGE