XU XUv0.16.2

Blog

Xu 0.16.2 Released: Phase 1–6 Optimization Batch, x86-64-v3 Codegen and the GVN Escape-Analysis Fix

· Xu v0.16.2

Xu 0.16.2 is officially released! This release lands the Phase 1–6 compiler, MIR, codegen and runtime optimization batch (PR #323), fixes an x86-64 miscompile that the same batch introduced in the global value numbering pass (PR #325), and calibrates the Windows release gate for the new task-stack defaults (PR #327).

See the Xu 0.16.0 release notes for the preceding top-of-file const rule and optimization Batches Q–T, and inspect the updated program structure guide, OS development guide, and API reference.

1. Runtime & Standard Library

2. Codegen: x86-64-v3, ARM64, Loop Layout & SLP

3. MIR Optimization Passes

4. Compiler Correctness: GVN Escape Analysis

The Phase 1–6 batch taught the global value numbering pass that a frame slot holding a backing-buffer pointer is disjoint from that buffer. That holds only while the slot is never aliased. As soon as a local's address escapes — its frame slot is passed to a call, stored through, or taken — a store through the buffer can land on the slot itself, and the disjointness reasoning removes a live load. On x86-64 this miscompiled #crypto/ecdh and broke the X25519 handshake with crypto/ecdh: bad input point, failing the Native macOS Intel SDK and platform seeds release gate (PR #323).

Xu 0.16.2 computes the set of locals whose address escapes and applies the frame-slot disjointness and slice-header rules only to slots that never escape. Buffer-owner bookkeeping is suppressed for values whose location is known, and frame-backed slice facts are pruned when the backing store is overwritten (PR #325).

5. Benchmarks (Verified 6-Platform v0.16.2 Run)

Measured across all 121 canonical workloads on six platforms in xulang-org/bench Actions Run #46330146722 (Xu commit eba3440c, 2026-11-30), with 0 Xu failures and 0 peer failures across 121 × 6 = 726 runs (xu_failed_cases = 0). Ratios represent Xu / best peer median (minimum across O1/O2/O3 for Clang and rustc); lower is faster:

Platform Coverage vs Clang Geomean / Median (Wins) vs rustc Geomean / Median (Wins) vs Go Geomean / Median (Wins) vs Swift Geomean / Median (Wins)
macOS ARM64121 / 1210.967× / 1.087× (39/116)0.854× / 1.003× (60/120)0.577× / 0.717× (102/121)0.444× / 0.574× (104/116)
Linux ARM64121 / 1210.810× / 1.015× (55/116)0.732× / 0.975× (67/120)0.508× / 0.686× (109/121)0.346× / 0.532× (110/114)
Windows ARM64121 / 1210.910× / 0.978× (68/116)0.846× / 0.939× (89/120)0.683× / 0.774× (115/121)—
macOS x86_64121 / 1210.971× / 1.093× (48/116)0.854× / 1.007× (59/120)0.668× / 0.795× (85/121)0.391× / 0.539× (99/116)
Linux x86_64121 / 1210.852× / 1.006× (55/116)0.781× / 0.991× (68/120)0.542× / 0.735× (98/121)0.350× / 0.560× (100/114)
Windows x86_64121 / 1210.919× / 0.999× (59/116)0.859× / 0.975× (70/120)0.643× / 0.725× (102/121)—

Representative cross-domain workload medians (the parenthesis is the ratio against the best Clang O1/O2/O3 on the same platform; the full matrix is on the multi-architecture benchmark dashboard):

Workload macOS ARM64 Linux ARM64 Windows ARM64 macOS x86_64 Linux x86_64 Windows x86_64
startup5.56 ms (1.86×)0.37 ms (0.59×)14.56 ms (0.96×)4.43 ms (0.63×)0.34 ms (0.47×)7.03 ms (0.88×)
loop_sum4.14 ms (0.38×)0.39 ms (0.03×)14.96 ms (0.53×)8.86 ms (0.60×)0.23 ms (0.04×)7.22 ms (0.44×)
fib23.01 ms (1.13×)10.98 ms (0.86×)25.04 ms (0.94×)25.99 ms (0.96×)17.64 ms (1.12×)24.12 ms (1.00×)
matmul9.31 ms (0.83×)6.27 ms (0.70×)20.51 ms (0.96×)14.07 ms (0.95×)8.06 ms (1.07×)14.46 ms (1.00×)
sieve_primes14.16 ms (0.80×)14.76 ms (1.06×)25.99 ms (0.99×)50.88 ms (1.18×)15.69 ms (1.03×)24.24 ms (0.99×)
sha256_chain3.89 ms (0.64×)0.65 ms (0.37×)15.21 ms (0.89×)14.08 ms (1.37×)0.60 ms (0.34×)7.47 ms (0.82×)
aes128_encrypt5.22 ms (0.13×)1.99 ms (0.08×)16.10 ms (0.35×)9.24 ms (0.18×)1.56 ms (0.09×)9.47 ms (0.20×)
scimark_fft13.74 ms (1.50×)5.89 ms (1.20×)20.72 ms (1.04×)11.43 ms (1.12×)4.85 ms (1.37×)12.97 ms (1.13×)
btree_index24.16 ms (0.89×)21.84 ms (1.13×)35.67 ms (1.04×)35.49 ms (1.10×)23.00 ms (0.93×)32.32 ms (0.85×)
sql_query_exec41.25 ms (1.09×)34.62 ms (1.28×)47.56 ms (1.17×)60.40 ms (1.20×)39.84 ms (1.23×)55.56 ms (1.29×)
expr_bytecode_vm17.06 ms (1.33×)11.26 ms (1.15×)26.05 ms (1.04×)23.48 ms (0.50×)7.31 ms (1.08×)25.08 ms (1.10×)
chan_ping15.22 ms26.32 ms48.36 ms21.61 ms18.68 ms32.93 ms

6. Upgrade & Downloads

Upgrade compiler, standard library, and SDK tools together from the Download center or GitHub Releases v0.16.2, and verify SHA256SUMS. This release changes no language syntax and no module manifest contract, so existing programs continue to compile unchanged; rebuild the toolchain as a whole so the compiler, standard library and SDK tools stay in sync.