All 57 Entries

RCE Compile: A Proposed 7-Part Compiler Normal-Form Contract, Per-Machine Prelude Cuts, and De Bruijn Warm-Cache Bounds

Refutes a descriptive "Law of Compilation" in favor of a proposed 7-part contract, separating Zen 5 (20.07x) vs Core i9 (15.44x) prelude cuts and up to 448.5x best-case warm De Bruijn cache hits (Linux RAPL reported_j).

David Charlot • • 7 min read • Glossary • Verification & AI-Use Disclosure
rce-compile compilers de-bruijn incremental-compilation rapl reported-j

Primary Source: Primary Paper: research.openie.dev/papers/rce-compile/ · Canonical Digest: blake3:tv:d561a8e7e445f1878caa5144e08df2f7cbe006ff65dba485bc787c7361a7027a · Telemetry Class: reported_j (Linux powercap RAPL core/PP0 & package counters on AMD Ryzen AI Max+ 395 (Zen 5) and dedicated Intel Core i9-13900H (reported_j; measured_j = null))

Unattended Gate Flag (human_in_gate = false): Automated build, benchmark, and proof-checking scripts ran without manual human override; signed & self-checked by OpenIE — not independently peer-reviewed (Verification & AI-Use Disclosure · Glossary).

Inline Evidence Tags: [T] machine-checked Lean 4 theorem over stated axioms · [E] empirical benchmark or hardware log · [M] analytical/mathematical model or simulation · [S] external literature, filing, or specification citation.

RCE Compile — 20.07x Zen 5 and 15.44x Core i9 prelude compile cuts and up to 448.5x best-case warm De Bruijn cache hit

Proposed 7-part Compiler Form contract, per-machine Linux RAPL reported_j compile payback, and De Bruijn warm-cache vs. cold-build separation.

Key Claims & Evidence Tags

  1. [M/S · Proposed Normal-Form Contract, Not a Law of Nature] The primary paper explicitly refutes the hypothesis that existing compilers obey a single “Law of Compilation,” restating it as a proposed 7-part engineering contract (R, L, C, K, U, E, G) and disclosing in Appendix A that 38 of 55 audited external claims rested on [S]/[K] snippet checks (14 partly overstated, 4 contradicted, 17 not found).
  2. [E · Per-Machine Cold Prelude & Optimization Payback (reported_j)] Across 20 integer/fixed-point kernels × 15 compiler tiers (300/300 matching checksums), factoring RCE’s emitted Rust runtime into pre-compiled librce_rt.rlib cut median per-kernel rustc -O3 core reported_j 20.07x (56.29 J -> 2.81 J core, 896.93 J -> 27.05 J pkg, 24.58x faster, lowering payback vs. Node JS from 31,080 to 1,079 runs) on AMD Ryzen AI Max+ 395 (Zen 5, pinned CPU 0, co-tenant load on other cores noted), and replicated at 15.44x PP0 core (84.40 J -> 5.47 J, 104.56 J -> 6.85 J pkg = 15.26x) on an idle dedicated Intel Core i9-13900H (4.46 W idle pkg)—while -O2 to -O3 never paid back its extra compile joules on 20%–30% of kernels.
  3. [E · Warm De Bruijn Cache Hit (up to 448.5x) vs. Cold Build] Crediting N. G. de Bruijn (1972) for nameless positional variable indexing (v0 - v1 vs. v1 - v0), E5-Scale (245 base programs, 500 verified semantic mutants, 29,890 cross-program pairs) recorded 0 / 500 false hits (whereas naive identifier-stripping collided on 150 / 150 (100%) variable-swap bugs) and cut rebuild work up to 448.5x (1.166 J -> 2.60 mJ rustc -O3 core reported_j) and 167.8x (0.682 J -> 4.07 mJ clang -O3) strictly on warm cache hits over alpha-renamed single-file kernels (66.7%–69.2% rename hit rate; 1.0x on cold unseen builds).

Methods, Baselines & Artifact Scope

Methodological DimensionPrimary-Paper Grounding & Scope
Hardware & Telemetry(1) E4-Energy / E4-Prelude / E5-Scale: AMD Ryzen AI Max+ 395 (Zen 5, 32 logical CPUs, pinned CPU 0, Linux RAPL core + pkg reported_j; co-tenants present on non-pinned cores); (2) Wave 5 idle replication: dedicated Intel Core i9-13900H (Raptor Lake, 4.46 W idle pkg, Linux RAPL PP0 + pkg reported_j); (3) E5 Wasm/object key study: Intel Xeon @ 2.80 GHz (Ubuntu 24.04.5, clang 18.1.3, rustc 1.97.0, unmetered hash comparison). measured_j = null (board_metered = false).
Workload & Benchmark SuiteE1: cross-directory/rename byte reproducibility; E4-Energy: 20 self-contained integer/fixed-point kernels × 15 C/Rust/Wasm/JS/Python tiers (300 cells); E5: 360 x86-64 objects, 144 Mach-O objects, 288 Wasm objects, 288 linked Wasm modules (26,208 cross-kernel pairs, 9,328 IR mutations); E5-Scale: 185 W1 RCE Forms + 60 C/Rust/Python kernels + 500 verified semantic mutants.
Baseline(s) ComparedRaw SHA-256 source/command hash (ccache-style), comment/whitespace-stripped hash, naive AST identifier-stripping (ID - ID), and De Bruijn positional canonicalization (de Bruijn 1972, Maziarz et al. PLDI 2021); inlined RCE Rust prelude vs. pre-compiled librce_rt.rlib.
Runs (N) & Spread / UncertaintyE4: 20 kernels (medians and per-kernel payback distributions reported; 20%–30% of kernels never recover -O2 -> -O3 compile energy; R^2 = 0.9999 for power × time vs. 0.1154 for static Wasm IR size). E5-Scale: deterministic over 245 programs, 29,890 pairs, and 500 mutants.
Caching / Cold vs. Warm ScopeExplicitly separated: 448.5x (rustc -O3), 167.8x (clang -O3), and 17.15x (rce check+emit) apply only on warm De Bruijn cache hits (69.2% hit rate on 185 renamed RCE Forms; 66.7% on 60 renamed C/Rust/Python kernels). Cold first-time builds pay 100% of compiler cost plus 2.60–4.59 mJ canonicalizer overhead.
Artifact & License AvailabilityKernels, mutant generators, and E4/E5 scripts public in openIE-dev/openie-research-experiments and openIE-dev/rce (Apache-2.0); self-checked by OpenIE, open for independent replication.

From Refuted “Law” to Proposed Normal-Form Contract & Lineage

The manuscript opens by testing—and refuting—the claim that real compilers (gcc, clang, rustc, Go, GHC, XLA, CompCert) already satisfy a unified “Law of Compilation” [E, S]. Instead, it defines a proposed 7-part Compiler Form contract (Representation R, Lowering L, Cost C, Checker K, Reuse U, Energy E, Gate G). Nameless positional variable indexing in R directly applies N. G. de Bruijn (1972) lambda-calculus indices and Maziarz et al. (PLDI 2021) alpha-equivalent IR hashing, sitting alongside incremental build systems such as ccache, Bazel, Adapton (Hammer et al., PLDI 2014), and Rust’s Salsa query engine [S].

Per-Machine Compile Payback (Zen 5 vs. Core i9-13900H) & Warm-Cache Scope

  • Cold compile amortization (E4-Energy & E4-Prelude) [E]: Lowering Python to clang -O3 requires a median of 2,490 executions to pay back compilation joules; stepping from -O0 to -O3 requires 53,464 to 102,720 runs; and -O2 to -O3 never pays back on 20%–30% of the 20 kernels. Pre-compiling RCE’s shared runtime into librce_rt.rlib cut per-kernel rustc -O3 compile energy 20.07x (56.29 J -> 2.81 J core reported_j) on AMD Ryzen AI Max+ 395 (Zen 5) and 15.44x (84.40 J -> 5.47 J PP0 reported_j) on an idle dedicated Intel Core i9-13900H [E].

  • Why De Bruijn positions beat naive ID-stripping (E5-Scale) [E]: Naive identifier stripping (x - y -> ID - ID) falsely collided on 150 / 150 (100%) variable-swap bugs (30.0% false-hit rate overall), whereas De Bruijn slot numbering (v0 - v1 vs. v1 - v0) yielded 0 / 500 mutant collisions and 0 / 29,890 cross-program collisions. On best-case warm cache hits when rebuilding alpha-renamed single-file kernels on pinned CPU 0, De Bruijn lookup (2.60–4.07 mJ) avoided 1.166 J rustc -O3 (448.5x) and 0.682 J clang -O3 (167.8x) rebuilds [E].

Limitations, IR Debug-Path Misses & Literature Snippet Audit

  • Debug-path & comment misses (E5 & E5-Scale) [E]: Linked Rust Wasm modules missed on 9/96 two-directory and renamed pairs at opt-level=0/1 because embedded panic column/path strings differed in the data segment; similarly, raw rce fmt nameless preserves # comments unless stripped prior to hashing (128/185 = 69.2% alpha-rename hit rate) [E].

  • Single-file integer scope & [S]/[K] citation limits: E4/E5-Scale cover single-file integer/fixed-point kernels without multi-TU C++ headers, LTO, or GPU shaders; and Appendix A flags 38/55 background literature claims as snippet-level checks requiring primary-text verification (§9) [S].

Energy & Telemetry Scope

All joule measurements are Regime-B Linux powercap RAPL core/PP0 and package reported_j (measured_j = null, board_metered = false), where power × wall_time explained 99.99% of RAPL variance (R^2 = 0.9999) compared with 11.54% for static Wasm byte size [E].

  • de Bruijn (Indag. Math., 1972) & Maziarz et al. (PLDI 2021): Nameless positional lambda-term indexing and hashing modulo alpha-equivalence [S].
  • Hammer et al. (Adapton, PLDI 2014), Rust Salsa, ccache & Bazel: Demand-driven incremental computation and content-addressed build caching [S].
  • Leroy (CompCert, CACM 2009) & Lopes et al. (Alive2, PLDI 2021): Verified compilation and translation validation [S].
  • Lattner et al. (MLIR, CGO 2021), Chen et al. (TVM, OSDI 2018), Halide & XLA: Multi-level IR lowering and cost-guided schedule search [S].
DC

David Charlot

Open Interface Engineering, Inc. · Signed Provenance · Self-Checked

E4/E5 kernel corpus and payback scripts public in openIE-dev/openie-research-experiments and openIE-dev/rce (Apache-2.0); prose CC0-1.0; self-checked, open for external replication. Full licensing & AI-use disclosure →

Apache-2.0 Public Kernels & Scripts · Self-Checked

Check the primary artifacts or run an independent replication

Inspect signed provenance manifests, rerun our public Apache-2.0 commodity-hardware replication kits, review our November 25, 2026 outside-review errata, or browse primary manuscripts on the Research Hub.