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. Low-latency L1-resident kernel (3113767/200000 cyc/op); well-suited for high-frequency pipeline stages.

Snap-Circuit Wiring Role: Slice Ingress / Scanner Stage `(&[u8])->u64` — digests raw byte buffers into scalar tokens or checksums.

Hardware _rdtsc: 3113767/200000 cycles/op
Latency: 593163/80000 ns/op
Throughput: 80000000/593163 ops/us
Compiled ELF64 .text: 278 B (77 x86_64 insns)
C64 64KB RAM Budget: 633/65536 (633 B source)
Ternary Vote: + (score 1) | Salience: 4040095/47502
Pure-Rust Capsule Source Code (633 B)
pub fn wupz_seal64(bytes: &[u8]) -> u64 {
    let mut acc: u64 = 0x9E37_79B9_7F4A_7C15 ^ (bytes.len() as u64);
    let (words, rem) = bytes.as_chunks::<8>();
    for (idx, chunk) in words.iter().enumerate() {
        let word = u64::from_le_bytes(*chunk);
        acc ^= word.rotate_left(((idx * 13) & 63) as u32);
        acc = acc.wrapping_mul(0xBF58_476D_1CE4_E5B9);
        acc ^= acc >> 27;
    }
    if !rem.is_empty() {
        let mut tail = [0u8; 8];
        tail[..rem.len()].copy_from_slice(rem);
        acc ^= u64::from_le_bytes(tail);
        acc = acc.wrapping_mul(0x94D0_49BB_1331_11EB);
    }
    acc ^ (acc >> 31)
}
rustc -C opt-level=3 x86_64 Disassembly (278 B .text / 77 insns)
wupz_seal64:
    push    r15
    push    r14
    push    r12
    push    rbx
    push    rax
    movabs    rbx, -7046029254386353131
    xor    rbx, rsi
    movabs    r8, 9223372036854775800
    and    r8, rsi
    mov    edx, esi
    and    edx, 7
    test    r8, r8
    je    .LBB7_7
    movabs    r9, -4658895280553007687
    add    rsi, -8
    shr    rsi, 3
    je    .LBB7_2
    inc    rsi
    mov    r14, rsi
    and    r14, -2
    mov    eax, 13
    xor    r10d, r10d
    mov    r11, rdi
.LBB7_4:
    lea    ecx, [rax - 13]
    mov    r15, qword ptr [r11]
    mov    r12, qword ptr [r11 + 8]
    rol    r15, cl
    xor    r15, rbx
    imul    r15, r9
    add    r11, 16
    add    r10, 2
    mov    ecx, eax
    rol    r12, cl
    xor    r12, r15
    shr    r15, 27
    xor    r15, r12
    imul    r15, r9
    mov    rbx, r15
    shr    rbx, 27
    xor    rbx, r15
    add    rax, 26
    cmp    r14, r10
    jne    .LBB7_4
    test    sil, 1
    jne    .LBB7_6
    jmp    .LBB7_7
.LBB7_2:
    xor    r10d, r10d
    mov    r11, rdi
.LBB7_6:
    mov    rax, qword ptr [r11]
    lea    ecx, [r10 + 2*r10]
    lea    ecx, [r10 + 4*rcx]
    rol    rax, cl
    xor    rax, rbx
    imul    rax, r9
    mov    rbx, rax
    shr    rbx, 27
    xor    rbx, rax
.LBB7_7:
    test    rdx, rdx
    je    .LBB7_9
    add    rdi, r8
    mov    qword ptr [rsp], 0
    mov    rax, rsp
    mov    rsi, rdi
    mov    rdi, rax
    call    qword ptr [rip + memcpy@GOTPCREL]
    xor    rbx, qword ptr [rsp]
    movabs    rax, -7723592293110705685
    imul    rbx, rax
.LBB7_9:
    mov    rax, rbx
    shr    rax, 31
    xor    rax, rbx
    add    rsp, 8
    pop    rbx
    pop    r12
    pop    r14
    pop    r15
    ret

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

Global RankCapsule & DomainHardware _rdtscLatencyThroughputELF .textTernary VoteAuthor Aye
#1648wupz_seal64 (THIS CAPSULE)
domain: smart-tree | id: 25011bf2e603cdb74b00c1aa74e06a1a
3113767/200000 cyc/op593163/80000 ns/op80000000/593163 ops/us278 B .text (77 insns)+ (1)aye::Hue+Gemini(0+1)::x86_64 @ 432Hz