Best Use & Engineering Application Guide

Engineering Category: Deterministic Sovereign Compute Kernel

Best Use in Production: Pure-Rust C64-bounded integer transformation kernel verified across 64 canonical test vectors for deterministic Snap-Circuit composition.

When to Select This Capsule: Holds the #1 Equivalence Crown across 2 functionally identical implementations (fastest verified hardware _rdtsc). Sub-10-cycle hardware kernel (383779/50000 cyc/op); safe for ultra-hot per-sample or per-packet inner loops.

Snap-Circuit Wiring Role: Specialized Multi-Pin Stage `(u64,u64,u64)->u64` — wire matching input pins via `snap_dag` or `snap_pipeline`.

Hardware _rdtsc: 383779/50000 cycles/op
Latency: 832947/400000 ns/op
Throughput: 400000000/832947 ops/us
Compiled ELF64 .text: 134 B (41 x86_64 insns)
C64 64KB RAM Budget: 27/4096 (432 B source)
Ternary Vote: + (score 1) | Salience: 36135/416
Pure-Rust Capsule Source Code (432 B)
pub const fn st_golf_aurora_grpo_advantage_q15_u64(reward_q15: u64, mean_q15: u64, std_q15: u64) -> u64 {
    let denom = if std_q15 == 0 { 1 } else { std_q15 };
    let diff = reward_q15.abs_diff(mean_q15);
    let scaled = diff.saturating_mul(4096) / denom;
    if reward_q15 >= mean_q15 {
        32768 + if scaled > 32767 { 32767 } else { scaled }
    } else {
        32768 - if scaled > 32768 { 32768 } else { scaled }
    }
}
rustc -C opt-level=3 x86_64 Disassembly (134 B .text / 41 insns)
st_golf_aurora_grpo_advantage_q15_u64:
    mov    rcx, rdx
    cmp    rdx, 1
    adc    rcx, 0
    mov    rdx, rdi
    sub    rdx, rsi
    mov    rax, rsi
    sub    rax, rdi
    cmovb    rax, rdx
    mov    rdx, rax
    shr    rdx, 52
    jne    .LBB7_2
    shl    rax, 12
    mov    rdx, rax
    or    rdx, rcx
    shr    rdx, 32
    je    .LBB7_4
.LBB7_5:
    xor    edx, edx
    div    rcx
    cmp    rsi, rdi
    jbe    .LBB7_8
.LBB7_7:
    xor    ecx, ecx
    mov    edx, 32768
    sub    rdx, rax
    cmovae    rcx, rdx
    mov    rax, rcx
    ret
.LBB7_2:
    mov    rax, -1
    mov    rdx, rax
    or    rdx, rcx
    shr    rdx, 32
    jne    .LBB7_5
.LBB7_4:
    xor    edx, edx
    div    ecx
    cmp    rsi, rdi
    ja    .LBB7_7
.LBB7_8:
    cmp    rax, 32767
    mov    ecx, 32767
    cmovb    rcx, rax
    or    rcx, 32768
    mov    rax, rcx
    ret

Head-to-Head Functional Equivalence Class Peers (2 Implementation(s) Matching 64 Test Vectors)

Global RankCapsule & DomainHardware _rdtscLatencyThroughputELF .textTernary VoteAuthor Aye
#59st_golf_aurora_grpo_advantage_q15_u64 (THIS CAPSULE)
domain: aurora-grpo | id: d5676684960a1caeb333ffd7d8042a1e
383779/50000 cyc/op832947/400000 ns/op400000000/832947 ops/us134 B .text (41 insns)+ (1)aye::Hue+Gemini(0+1)::x86_64 @ 432Hz
#1656aurora_grpo_advantage_q15
domain: signal | id: dd168d1447da97a79eb556fcec2b41d4
5993323/400000 cyc/op1937713/400000 ns/op400000000/1937713 ops/us183 B .text (56 insns)0 (0)aye-aurora-8b-voice @ 432Hz