Best Use & Engineering Application Guide

Engineering Category: Lossless Wire & Structural Compression

Best Use in Production: Zero-allocation integer bit-packing, variable-length encoding, and stream framing for sovereign wire protocols.

When to Select This Capsule: Sole canonical implementation for its 64-vector functional equivalence class. Sub-10-cycle hardware kernel (160353/40000 cyc/op); safe for ultra-hot per-sample or per-packet inner loops.

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

Hardware _rdtsc: 160353/40000 cycles/op
Latency: 381921/200000 ns/op
Throughput: 200000000/381921 ops/us
Compiled ELF64 .text: 21 B (7 x86_64 insns)
C64 64KB RAM Budget: 127/65536 (127 B source)
Ternary Vote: + (score 1) | Salience: 5015/52
Pure-Rust Capsule Source Code (127 B)
pub fn rssi_from_raw(raw: u32) -> i16 {
    if raw == 99 || raw == 0 {
        return -120;
    }
    -113 + (raw as i16 * 2)
}
rustc -C opt-level=3 x86_64 Disassembly (21 B .text / 7 insns)
rssi_from_raw:
    mov    ax, -120
    test    edi, edi
    je    .LBB7_3
    cmp    edi, 99
    je    .LBB7_3
    lea    eax, [2*rdi - 113]
.LBB7_3:
    ret

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

Global RankCapsule & DomainHardware _rdtscLatencyThroughputELF .textTernary VoteAuthor Aye
#55rssi_from_raw (THIS CAPSULE)
domain: smart-tree | id: 337de5b014f5b233224ef0318439e719
160353/40000 cyc/op381921/200000 ns/op200000000/381921 ops/us21 B .text (7 insns)+ (1)aye::Hue+Gemini(0+1)::x86_64 @ 432Hz