Xu 0.14.1 Released: Pure-Xu Local LLM Inference, P4K4 & Paged Attention Fusion, and Cross-Platform Compiler Speedups
Xu 0.14.1 is officially released! Following 0.14.0's bare-metal OS kernel foundation, Xu 0.14.1 brings major advances in pure-Xu local AI inference, opt-in MIR tensor fusion and core compiler optimizations, cryptography/TLS/short-string runtime performance, and macOS code-signing reliability. Every target has passed the six-platform native SDK gate and the complete 72-workload cross-language benchmark suite with zero failures.
1. Pure-Xu Local LLM Inference (examples/llm_engine/main.xu)
examples/llm_engine/main.xu demonstrates end-to-end local language-model inference in pure Xu without external inference runtimes:
- Streaming GGUF Loading & Internal P4K4 Weight Packing: Loads F32 Safetensors and compatible Llama- and Qwen2-architecture GGUF v2/v3 models, packing Q4_0 and Q8_0 weights in memory into the internal P4K4 layout for grouped GEMV4 and
M=12GEMM kernels while keeping GGUF files unchanged on disk; - Paged KV Cache & Continuous Batching: Provides a paged key/value cache and coroutine continuous-batching scheduler for batched prefill and autoregressive decoding;
- ABI-Safe Standard Library Additions: Adds
slice.reserve(n int),slice.resize_zero(n int), andmath.float16_to_f32(h int) f32without altering the frozen core runtime ABI.
2. Opt-In MIR Tensor Fusion & Paged Attention Kernels
With XU_TENSOR_FUSION=1 (and optional XU_TENSOR_FAST_MATH=1), the compiler lowers eligible Xu numerical loops in optimized native ARM64 and x64 builds:
- Paged Attention Fusion: Recognizes paged attention score calculation (
__xu_tensor_attn_scores_paged*), scaled softmax (__xu_tensor_softmax_scaled*), and value weighted accumulation (__xu_tensor_attn_vsum_paged*), dispatching to available scalar or ARM64 NEON/DotProd and x86-64 SSE kernels; - Quantization & Activation Kernels: Covers Q4_0/Q8_0 pack/quantization, RMSNorm, RoPE, SwiGLU, argmax, and P4K4/signed grouped matrix operations.
3. Compiler Optimizer, Standard Library & macOS Signing
- Middle-End & Codegen Improvements: Adds loop constant hoisting (
opt_hoist_loop_consts), slice descriptor vs. element-buffer disjointness proofs, loop unrolling and pointer strength reduction, GVN direct-call effect modeling,blk_noreturnliveness pruning with register coalescing, and ARM64FMADD/FMSUB/TSTand x64TESTlowering; - Runtime & Stdlib Speedups: Accelerates short-string paths, X25519 scalar multiplication, and Montgomery
big.exp; completes additional TLS 1.3 handshake combinations; enforces JSON parser node-count bounds; - Complete macOS Signing: macOS SDK binaries and standalone installers ship ad-hoc signed, and the CLI signs temporary Apple Silicon executables generated during native
xu runandxu test.
4. Verified Six-Platform Cross-Language Benchmarks (Run #45679539741)
Measured across all 72 canonical workloads on six platforms in xulang-org/bench Actions Run #45679539741 (Xu commit f99d40da) against same-platform fastest Clang (O1/O2/O3), fastest rustc (O1/O2/O3), Go build, and Swift -O (ratios < 1.0x mean Xu is faster):
| Target Platform | Xu / Clang (geomean / median) | Xu / Rust (geomean / median) | Xu / Go (geomean / median) | Xu / Swift (geomean / median) |
|---|---|---|---|---|
| Linux ARM64 | 0.713x / 0.988x (41/70 ≤ C) | 0.676x / 0.954x (46/72 ≤ Rust) | 0.419x / 0.584x (65/72) | 0.293x / 0.473x (68/68) |
| Windows ARM64 | 0.851x / 0.968x (52/70 ≤ C) | 0.804x / 0.947x (57/72 ≤ Rust) | 0.613x / 0.735x (70/72) | — |
| Linux x64 | 0.886x / 1.126x | 0.824x / 1.079x | 0.503x / 0.715x (59/72) | 0.339x / 0.540x (56/68) |
| Windows x64 | 0.923x / 1.059x | 0.883x / 1.032x | 0.593x / 0.745x (66/72) | — |
| macOS ARM64 | 0.957x / 1.087x | 0.888x / 1.072x | 0.550x / 0.714x (61/72) | 0.422x / 0.621x (64/70) |
| macOS x64 | 1.039x / 1.185x | 0.954x / 1.120x | 0.648x / 0.845x (53/72) | 0.423x / 0.721x (50/70) |
Selected workload results on macOS ARM64 (7-sample medians, ms) and improvements over Xu 0.14.0:
| Workload (macOS ARM64) | Xu v0.14.1 | Clang (best) | rustc (best) | Go build | Delta vs. 0.14.0 |
|---|---|---|---|---|---|
array_ops |
7.22 ms | 6.66 ms | 8.83 ms | 26.52 ms | -65.3% (20.82 → 7.22 ms) |
nested_loop |
19.14 ms | 21.79 ms | 16.63 ms | 50.30 ms | -61.8% (50.09 → 19.14 ms) |
match_sum |
10.12 ms | 16.04 ms | 7.70 ms | 53.26 ms | -61.5% (26.27 → 10.12 ms) |
method_sum |
5.52 ms | 4.13 ms | 4.70 ms | 26.75 ms | -52.8% (11.70 → 5.52 ms) |
sieve_primes |
14.64 ms | 10.49 ms | 15.56 ms | 15.31 ms | -52.5% (30.82 → 14.64 ms) |
chan_ping |
12.32 ms | — | 64.65 ms | 23.92 ms | 1.94x faster than Go, 5.25x vs. Rust |
aes128_encrypt / sha256_chain |
4.81 / 3.52 ms | 26.24 / 4.05 ms | 31.77 / 5.26 ms | 48.26 / 6.48 ms | aes128_key_setup -41.9% |
5. Upgrading & Distribution
All 30 official distribution assets and SHA256SUMS for Xu v0.14.1 are published on GitHub Releases. Upgrade the compiler, standard library, and SDK tools together. Existing GGUF files keep their on-disk format and are packed in memory when loaded.
Download Center · Benchmarks Dashboard · Local AI Inference Guide · GitHub Release Page · Full Release Notes