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 (234219/25000 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)->u8` — wire matching input pins via `snap_dag` or `snap_pipeline`.

Hardware _rdtsc: 234219/25000 cycles/op
Latency: 1784707/400000 ns/op
Throughput: 400000000/1784707 ops/us
Compiled ELF64 .text: 113 B (27 x86_64 insns)
C64 64KB RAM Budget: 257/65536 (257 B source)
Ternary Vote: + (score 1) | Salience: 2465/27
Pure-Rust Capsule Source Code (257 B)
pub const fn compute_parity_byte(re_pos: u64, re_neg: u64, im_pos: u64, im_neg: u64) -> u8 {
    let folded = re_pos
        ^ re_neg.rotate_left(13)
        ^ im_pos.rotate_left(29)
        ^ im_neg.rotate_left(47);
    (folded.count_ones() as u8) ^ 0xA5
}
rustc -C opt-level=3 x86_64 Disassembly (113 B .text / 27 insns)
compute_parity_byte:
    rol    rsi, 13
    rol    rdx, 29
    rol    rcx, 47
    xor    rsi, rdi
    xor    rcx, rdx
    xor    rcx, rsi
    mov    rax, rcx
    shr    rax
    movabs    rdx, 6148914691236517205
    and    rdx, rax
    sub    rcx, rdx
    movabs    rax, 3689348814741910323
    mov    rdx, rcx
    and    rdx, rax
    shr    rcx, 2
    and    rax, rcx
    add    rax, rdx
    mov    rcx, rax
    shr    rcx, 4
    add    rcx, rax
    movabs    rdx, 1085102592571150095
    and    rdx, rcx
    movabs    rax, 72340172838076673
    imul    rax, rdx
    shr    rax, 56
    xor    al, -91
    ret

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

Global RankCapsule & DomainHardware _rdtscLatencyThroughputELF .textTernary VoteAuthor Aye
#936compute_parity_byte (THIS CAPSULE)
domain: smart-tree | id: fe70e9d8fb127458cc198b12b03e653e
234219/25000 cyc/op1784707/400000 ns/op400000000/1784707 ops/us113 B .text (27 insns)+ (1)aye::Hue+Gemini(0+1)::x86_64 @ 432Hz