XU XUv0.16.0

Blog

Xu 0.16.0 Released: Top-of-File const Rule, Batches Q–T, SIMD/Span/Media, ESP32-C3 & Kernel Primitives

· Xu v0.16.0

Xu 0.16.0 is officially released! This release enforces a clean top-of-file placement rule for module-level const declarations, lands compiler, MIR, and runtime optimization Batches Q–T across ARM64, x86-64, LoongArch64, and RISC-V, introduces #simd, zero-copy #bytes/span, #bytes/aligned, #gpu/video, #ffi/dl, and #os/mmap, expands ESP32 & ESP32-C3 (RV32) ELF32 object emission, and deepens freestanding #core drivers and kernel traps.

See the Xu 0.15.0 release notes for the preceding legacy or removal and Batches A–P milestone, and inspect the updated program structure guide, OS development guide, and API reference.

1. Breaking Language Change: Top-of-File const Placement

2. Compiler, MIR & Runtime Performance (Batches Q–T)

3. SIMD, Zero-Copy Span, Media & Dynamic FFI

4. Embedded ESP32 / ESP32-C3 (RV32) & Freestanding #core

5. Standard Library Hardening & #flag Extensions

6. Benchmarks (Verified 6-Platform v0.16.0 Run)

Measured across all 121 canonical workloads on six platforms in xulang-org/bench Actions Run #46208668702 (Xu commit 9b7d2689, 2026-11-29), with 0 Xu failures across 121 × 6 = 726 runs (xu_failed_cases = 0; on Windows ARM64, peer rustc -O3 hit one transient socket buffer failure WSAENOBUFS on http_concurrent while rustc -O1/-O2 passed). 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 / 1211.010× / 1.093× (37/116)0.901× / 1.012× (56/120)0.606× / 0.744× (100/121)0.462× / 0.654× (107/116)
Linux ARM64121 / 1210.834× / 0.999× (59/116)0.753× / 0.982× (69/120)0.519× / 0.704× (106/121)0.356× / 0.544× (106/114)
Windows ARM64121 / 1210.927× / 0.984× (66/116)0.859× / 0.948× (87/120)0.691× / 0.767× (112/121)—
macOS x86_64121 / 1210.961× / 1.065× (46/116)0.859× / 1.033× (51/120)0.666× / 0.806× (92/121)0.398× / 0.592× (99/116)
Linux x86_64121 / 1210.883× / 1.024× (54/116)0.807× / 1.002× (60/120)0.553× / 0.763× (92/121)0.351× / 0.565× (96/114)
Windows x86_64121 / 1210.932× / 1.022× (50/116)0.868× / 0.992× (66/120)0.650× / 0.766× (101/121)—

Representative workload medians across domains (ratios vs. same-platform best Clang O1–O3 in parentheses; explore all 121 workloads on the Benchmarks dashboard):

Workload macOS ARM64 Linux ARM64 Windows ARM64 macOS x86_64 Linux x86_64 Windows x86_64
startup7.83 ms (1.24×)0.33 ms (0.57×)14.36 ms (0.95×)4.38 ms (0.60×)0.33 ms (0.45×)7.24 ms (0.89×)
loop_sum9.78 ms (0.79×)0.36 ms (0.03×)15.00 ms (0.54×)9.69 ms (0.45×)0.29 ms (0.04×)4.52 ms (0.42×)
fib27.97 ms (0.93×)11.12 ms (0.88×)24.99 ms (0.92×)38.64 ms (1.19×)20.39 ms (1.11×)21.27 ms (1.05×)
matmul9.86 ms (0.90×)6.25 ms (0.73×)20.40 ms (0.97×)14.16 ms (0.75×)7.96 ms (1.04×)14.01 ms (0.86×)
sieve_primes11.49 ms (0.95×)17.20 ms (1.05×)23.87 ms (0.95×)49.24 ms (0.92×)14.87 ms (1.05×)18.10 ms (1.02×)
sha256_chain5.16 ms (0.80×)0.68 ms (0.37×)15.37 ms (0.94×)15.79 ms (1.25×)0.70 ms (0.34×)5.92 ms (0.80×)
aes128_encrypt10.18 ms (0.21×)1.80 ms (0.07×)16.48 ms (0.35×)12.67 ms (0.15×)1.65 ms (0.09×)5.78 ms (0.21×)
scimark_fft10.50 ms (1.50×)5.91 ms (1.20×)20.61 ms (1.04×)12.86 ms (1.41×)6.64 ms (1.46×)11.04 ms (1.22×)
btree_index29.91 ms (1.19×)22.12 ms (1.15×)35.06 ms (1.03×)29.79 ms (0.96×)27.29 ms (0.96×)28.61 ms (0.94×)
sql_query_exec47.85 ms (1.21×)37.57 ms (1.37×)50.47 ms (1.27×)60.67 ms (1.32×)59.43 ms (1.53×)70.44 ms (1.57×)
expr_bytecode_vm19.66 ms (1.49×)11.25 ms (1.16×)26.25 ms (1.03×)23.42 ms (0.51×)7.74 ms (1.04×)12.35 ms (1.13×)
chan_ping19.81 ms24.02 ms36.56 ms30.24 ms22.44 ms27.25 ms

7. Upgrade & Downloads

Upgrade compiler, standard library, and SDK tools together from the Download center or GitHub Releases v0.16.0, and verify SHA256SUMS. If your modules declare top-level const items below fn/struct/enum/let declarations, move those const declarations to the top of each file after imports.