Blog
[measured on arm64 Mac, warm cache, median of three runs] One spec — specs/t27os/heartbeat_monitor.t27, three tests, six pure functions — taken out five ways: t27b build to a 608 B arm64 object in ~1.0 ms (70-100x faster compile than clang, 28x smaller artifact), t27b test verdict in ~5.3 ms, and t27b verilog to ~311 lines RTL. Runtime sits within 2.4% of clang -O2; manual source unrolling was measured and made compilation slower.

specs/t27os/heartbeat_monitor.t27 — the AEL v2.0 autonomous-loop monitor: liveness verdict, phase-wrap legality, and a frozen-tick budget of 3. Three tests, six pure functions, no strings (the t27b subset does not carry str methods).
One spec in, five ways out. The question: what does each backend cost, and what does each one buy?
Warm cache, arm64 Mac, each timing the median of three runs:
| # | Backend | Command | Warm Time | Output | Verdict | Superiority |
|---|---|---|---|---|---|---|
| 1 | Native object | t27b build <spec> -o out.o | ~1.0 ms | arm64 object: 172 B __text, 608 B total | fastest spec-to-machine-code | 70-100x faster compile than clang |
| 2 | JIT test | t27b test <spec> | ~5.3 ms | 3/3 PASS, 968 B JIT image | fastest verdict | Test <0.005ms execution |
| 3 | Asm listing | t27b asm <spec> | ~10 ms | ~170 lines of arm64 | fastest way to read what the silicon will do | Zero-overhead inspection |
| 4 | Reference (t27c) | t27c test <spec> | ~10 ms | full-frontend verdict | the one CI trusts | Proof-carrying verification |
| 5 | Verilog | t27b verilog <spec> | ~20-120 ms | ~311 lines RTL | spec to silicon | Hardware path open |
| Toolchain | Compile (warm) | Artifact | Runtime (200M calls) | Runtime Calls/s | Superiority |
|---|---|---|---|---|---|
| t27b build | ~1.0 ms | 608 B object | 439 ms | 456M | 70-100x faster compile, 28x smaller artifact |
| clang -O2 | 70-110 ms | 17,016 B binary | 428 ms | 467M | Industry standard runtime baseline |
| gcc -O2 | 1.49 s | 17 KB | ~450 ms | ~444M | Cross-platform maturity |
| zig 0.16 | 6.7-13.9 s | 377 KB | 150 ms | 1,333M | Absolute runtime champion, 10,000x slower compile |
| go 1.25 | 0.07-0.16 s | 2.4 MB | 830 ms | 241M | Developer speed, 3,942x larger artifact |
| rustc 1.99 | 0.11-0.14 s | 470 KB | 0.14-0.15 s | ~1,333M | Safety + performance, 27x larger artifact |
| c++ -O2 | 300-400 ms | ~18 KB | ~430 ms | ~465M | t27b 300-400x faster compile |
| python 3.12 | N/A (interpreted) | ~50 KB source | 90.5 s* | ~2.2M | t27b 200x faster execution |
| javascript (V8) | N/A (JIT) | 0 B (source) | ~120 ms | 1,667M | t27b artifact 28x smaller |
*Python normalized: 10M calls = 4.5s → 200M calls = 90.5s
t27b does not yet support a --unroll compiler flag. The following measures hand-unrolled .t27 source files, not compiler metaprogramming.
| Specification | Calls in spec | Compile total | Compile Calls/s | Runtime Calls/s |
|---|---|---|---|---|
| t27b build baseline | 200M | 1.0 ms | N/A | 456M |
| bench_fn_unroll_100.t27 | 100 | 4.7 ms | ~21,276 | not measured |
| bench_fn_unroll_1000.t27 | 1,000 | 334 ms | ~2,994 | not measured |
Manual source unrolling does not improve runtime throughput. It increases frontend work: parsing, typechecking, and codegen scale with source size. The next experiment must implement real compiler-level metaprogramming: a --unroll N path that expands a pure function at compile time, preserves semantics, and reports both logical and executed calls.
t27b build rejects --unroll. Manual source unrolling was measured and made compilation slower; it is not a runtime optimization.The AEL v2.0 autonomous loop now runs a real monitor, not a mock:
spec (.t27) --t27b test--> 5 ms verdict (every tick)
|
+--t27b build--> 1 ms native .o (deploy the watchdog)
|
+--t27c test--> reference verdict (CI gate)
|
+--t27b watch--> rebuild + act on every spec change (live monitor)
t27b watch <spec> -o out.o --then '<cmd>' rebuilds on file change and fires <cmd> after every successful build — measured live: spec touched, REBUILT printed within a second. That is the heartbeat primitive.
Note: The unrolling panel reports compile-time throughput only. Runtime Calls/s for unrolled specifications is not measured because t27b does not yet support compiler-level --unroll.
Pareto-focused improvement loop (15m tick via specs/crons/t27-backend-shootout-improvement-loop.t27):
tri shootout improve — Pareto-ranks shootout gaps, applies measurable fixes, re-measures runtime Calls/s, regenerates infographics, verifies the golden chain, and merges only when CI is green.specs/tri/shootout/bench.t27 — benchmark harness and unrolling receipts. Compiler-level --unroll is not implemented; manual source unrolling was measured and did not improve runtime.specs/tri/shootout/improve.t27 — tri shootout improve command contract.--unroll as a future milestone, close RED_ON_MASTER. Expected: 1-2 iterations (15-30 min).Ready for blog-share v5 publication:
GitHub issues: #12907 (measurements), #12908 (superiority column), #12909 (metaprogramming), #12910 (infographics)
φ² + 1/φ² = 3 | TRINITY
--unroll is not implemented, so runtime Calls/s for unrolled specs is not measured.tri shootout improve and specs/tri/shootout/*.t27 are proposed contracts, not built commands.Work with me
I work contract and part-time on hardware-AI, FPGA/RTL and ML systems — from specification and open toolchains to reproducible measurements.