Figure 2 — Three Loop Styles — LAMBDA CR6 Dominates

Side-by-side comparison of While (BRANCH), CALL CR6 (full gate recursion), and LAMBDA CR6 (idempotent self-invocation). LAMBDA CR6 dominates: identical security, O(1) cost, zero additional hardware, no branch-prediction vulnerabilities.

While (BRANCH) Conventional loop MCMP r1, #0 BEQ exit ; body SUB r1, r1, #1 MCMP r1, #0 BNE loop exit: ⚠ Branch prediction required ⚠ Spectre/Meltdown vulnerable ⚠ Pipeline stall risk Stack: 0 frames Branches: 2 per iteration Unwind: O(1) New HW: branch predictor Security: vulnerable SPECTRE RISK CALL CR6 (full gate) Recursive call with re-validation CALL CR6 ; body CALL CR6 (recursive) ... RETURN (N times) RETURN RETURN ... ⚠ Gate re-validates SAME GT N times ⚠ Re-splits SAME lump N times ⚠ Redundant cost, zero security benefit Stack: 2N words Branches: 0 Unwind: O(N) New HW: stack memory Security: same as LAMBDA STRICTLY INFERIOR LAMBDA CR6 (optimal) Idempotent self-invocation LAMBDA CR6 ; body LAMBDA CR6 (re-enter) ... RETURN #1 (base case) clear flag, jump RETURN #2 (real return) ✔ No gate re-validation ✔ No branch prediction ✔ No pipeline stalls Stack: 0 frames Branches: 0 Unwind: O(1) — always 2 RETURNs New HW: NONE Security: X perm at entry ✔ OPTIMAL COMPARISON METRICS Metric While (BRANCH) CALL CR6 LAMBDA CR6 Stack growth 0 2N words 0 Branches/iter 2 0 0 Unwind cost O(1) O(N) O(1) — always 2 New hardware predictor stack memory NONE Spectre safe? NO YES YES WHY LAMBDA CR6 DOMINATES 1. Same security as CALL CR6: same method, same domain, same capabilities. Gate re-validation is redundant. 2. O(1) cost vs O(N): no stack growth, no gate re-checks, no lump re-splits. 3. Zero additional hardware: LAMBDA CR6 uses the existing 1-bit flag and PC register. No predictor needed. 4. Deterministic pipeline: no branch instructions means no speculation, no Spectre, no Meltdown. CALL CR6 is strictly inferior. While loops are architecturally vulnerable. LAMBDA CR6 is the optimal recursion primitive.