Skip to content

RCE Compile: A Law of Compilation, Tested as a Normal Form Against Real Compilers

Plain-Words Quick Guide (30 sec) 📊 Linux RAPL On-Chip Counter (reported_j) · 300/300 Verified Cells

When Heavy Compiler Optimization Actually Pays Back Its Energy

Spending fifty joules optimizing a program that only runs ten times wastes electricity—and smart name-free caching avoids recompiling code when someone merely renames a variable.

Think of it like: Think of spending three hours sharpening an axe to chop a single twig versus chopping a winter's worth of firewood—and recognizing the exact same recipe even if the chef renamed the bowls.
And (Setup)
Compilers translate human-written programs into fast machine instructions, and aggressive optimization flags make finished binaries run faster.
But (Problem)
Heavy optimization burns substantial energy upfront—on 30% of our tested C and Rust kernels, `-O3` never paid back its extra compile energy over `-O2`—and ordinary caches rebuild from scratch whenever variable names change.
Therefore (Result)
Pre-compiling shared runtime libraries cuts Rust compile energy 20× (slashing payback from 31,080 runs down to 1,079), while position-based name-free hashing cuts warm rebuild energy up to 448.5× with zero mix-ups across 500 code mutants.
Key Result:448.5× lower warm-cache Rust rebuild chip energy with 0/500 false cache collisions, and 28.8× earlier payback (`N*` = 1,079 runs) using a pre-compiled shared library (`reported_j`). ▶ Watch 15s Plain Film →

RCE Compile is a research project in the repository of the Reality Code Engine (RCE). It asks whether one statement of what compilation is, a Law of Compilation, holds for any compiler, independent of RCE. Checked against twelve families of production compilers, the candidate fails as a description: no compiler hashes a name-free representation, lowering in shipping compilers is neither total nor proved to preserve meaning, and no compiler accounts for energy. It holds as a normative framework: a normal form with two bounds and a measured distance from them, against which every compiler can be placed.

What the study claims and what it does not

  1. It claims that the candidate, as first stated, is falsified as a description of real compilers, and gives the evidence part by part.
  2. It states a refined standard with seven parts, four equivalence levels and a gate that names what it preserves and the evidence it accepts on, and seven hypotheses with falsifiers.
  3. It reports the three empirical tracks run so far. Byte comparisons of compiler outputs on three machines leave the hypothesis that lowering is deterministic neither supported nor falsified. Alongside the original 96-row WebAssembly erasure counts, pre-registered Linux RAPL on-chip reported_j measurements across 20 deterministic kernels and 15 compiler tiers (300 of 300 checksum-verified) show that lowering from Python to clang -O3 pays back after a median of 2,490 runs, -O0 to -O3 needs 53,464 to 102,720 runs, -O2 to -O3 never recovers its extra compile joules on 4 to 6 of the 20 kernels, pre-compiling RCE's standalone Rust runtime prelude once into a shared librce_rt.rlib crate cuts per-kernel emitted Rust -O3 compile reported_j by 20.07× (56.29 J to 2.81 J core, cross-checked at 15.44× on an idle dedicated Core i9-13900H host) and lowers its payback against Node JS from 31,080 to 1,079 runs, and Regime-B time multiplied by power explains far more variance than static IR size (0.9999 against 0.1154). De Bruijn name-free hashing scaled across 185 RCE Forms, 60 C/Rust/Python kernels, and 500 verified semantic mutants yields 0 of 500 (0.00%) false hits and 167.8× to 448.5× warm rebuild savings, whereas naive identifier-stripping collides on 150 of 150 variable-binding swaps.
  4. It does not claim board-level supply wattmeter readings (board_metered = false, measured_j = None), Regime-A or Regime-C hardware measurements, a measured 98/2 split, or priority over earlier work: two primary sources (Hoare, He and Sampaio, 1993; Ershov, 1977) have not yet been read in full, and almost every external source was seen only as a search result.
Grid of twelve compiler families against the seven parts of the Compiler Form; energy is absent in every row.
Figure 1. Where each part of the Compiler Form is found, by compiler family. Qualitative; almost every cell rests on search-result or memory evidence.
Lifecycle energy crossover curves, -O2 to -O3 payback outcomes across 20 kernels, and E5-Scale soundness across 500 verified semantic mutants.
Figure 2. Pre-registered Wave 4 E4-Energy, Wave 5 E4-Prelude (librce_rt.rlib), and E5-Scale payback horizons (Linux RAPL core reported_j; board_metered = false) and De Bruijn reuse soundness across 245 programs and 500 semantic mutants.

30 November 2026 update · Sovereign 3-ISA + RV64IM ELF64 Backend & Thor INA3221 Shunts (commit 258cbb11)

At openIE-dev/rce commits 258cbb11 & f87d6af2 (493/493 workspace tests), rce-compile adds zero-LLVM sovereign binary emission across x86-64 (Mach-O, ELF), aarch64 (Mach-O, ELF, PE), standalone static Linux RISC-V RV64IM ELF64 (20/20 byte-exact under qemu-riscv64), and wasm32 (9/9 deeper_tiers checks), four decidable bounded equivalence fragments, 1,280/1,280 (100.0%) CapSandbox Gear-0 standard-library coverage, TI INA3221 DC rail shunt measured_j on Jetson AGX Thor (59.84 uJ net dynamic / 1,102.81 uJ gross per 4-artifact compile, 3.04% idle drift), and 35/35 multi-function call-graph De Bruijn canonicalization (FormJEPA).