X: A Programming Language That Makes Optimisation Explicit
X is a programming language and compiler that makes optimisation explicit through checked language features. Its ten constructs combine explicit optimisation choices with checked rules for effects, ownership, record invariants and calls. Programmers request caching, parallel execution and data-layout changes without rewriting the underlying computation. We study how memoisation, parallel execution and data layout interact with purity, ownership and invariant checks. The compiler is written in Rust and targets LLVM; companion Lean models establish preservation properties for record updates and cache behaviour. Experiments compare the transformations separately and in combination with matched C implementations. Memoisation and parallelism speed up binomial option valuation by a median factor of 5.20 over serial, uncached C compiled with Clang at O3 on a batch of 4,096 positions with repeated inputs. Columnar storage speeds up serial payoff queries by a median factor of 4.38 at about four million positions. For CRC-32 validation, LLVM reduces the computation enough that caching and parallel dispatch increase runtime. Repository: https://github.com/x-lang-project/x-lang
Authors
- William Kirkman-Moller
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-17
- DOI
- https://doi.org/10.5281/zenodo.24305442
- Primary Topic
- Logic, programming, and type systems
- Type
- preprint