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: Verified baseline member of a 4-capsule Equivalence Class; useful as a reference or cross-validation peer. Low-latency L1-resident kernel (91627/5000 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: 91627/5000 cycles/op
Latency: 698261/80000 ns/op
Throughput: 80000000/698261 ops/us
Compiled ELF64 .text: 512 B (121 x86_64 insns)
C64 64KB RAM Budget: 259/32768 (518 B source)
Ternary Vote: + (score 1) | Salience: 127745/1488
Pure-Rust Capsule Source Code (518 B)
pub const fn wupz_xor_fold_bytes(bytes: &[u8]) -> u64 {
    let mut acc: u64 = 0;
    let mut i = 0;
    while i + 8 <= bytes.len() {
        let w = u64::from_le_bytes([
            bytes[i],
            bytes[i + 1],
            bytes[i + 2],
            bytes[i + 3],
            bytes[i + 4],
            bytes[i + 5],
            bytes[i + 6],
            bytes[i + 7],
        ]);
        acc ^= w;
        i += 8;
    }
    while i < bytes.len() {
        acc ^= bytes[i] as u64;
        i += 1;
    }
    acc
}
rustc -C opt-level=3 x86_64 Disassembly (512 B .text / 121 insns)
wupz_xor_fold_bytes:
    push    r15
    push    r14
    push    rbx
    cmp    rsi, 8
    jae    .LBB7_7
    xor    edx, edx
    xor    eax, eax
    jmp    .LBB7_2
.LBB7_7:
    xor    ecx, ecx
    xor    eax, eax
.LBB7_8:
    cmp    rcx, rsi
    jae    .LBB7_19
    lea    r8, [rcx + 1]
    cmp    r8, rsi
    jae    .LBB7_20
    lea    r8, [rcx + 2]
    cmp    r8, rsi
    jae    .LBB7_21
    lea    r8, [rcx + 3]
    cmp    r8, rsi
    jae    .LBB7_22
    lea    r8, [rcx + 4]
    cmp    r8, rsi
    jae    .LBB7_23
    lea    r8, [rcx + 5]
    cmp    r8, rsi
    jae    .LBB7_24
    lea    r8, [rcx + 6]
    cmp    r8, rsi
    jae    .LBB7_25
    lea    r8, [rcx + 7]
    cmp    r8, rsi
    jae    .LBB7_17
    movzx    r8d, byte ptr [rdi + rcx]
    movzx    edx, byte ptr [rdi + rcx + 1]
    movzx    r15d, byte ptr [rdi + rcx + 2]
    movzx    r14d, byte ptr [rdi + rcx + 3]
    movzx    ebx, byte ptr [rdi + rcx + 4]
    movzx    r11d, byte ptr [rdi + rcx + 5]
    movzx    r10d, byte ptr [rdi + rcx + 6]
    movzx    r9d, byte ptr [rdi + rcx + 7]
    shl    r9, 56
    shl    r10, 48
    shl    r11, 40
    shl    rbx, 32
    shl    r14d, 24
    shl    r15d, 16
    shl    edx, 8
    or    rdx, r8
    or    rdx, r15
    or    rdx, r14
    or    rdx, rbx
    or    rdx, r11
    or    rdx, r10
    or    rdx, r9
    xor    rax, rdx
    lea    rdx, [rcx + 8]
    add    rcx, 16
    cmp    rcx, rsi
    mov    rcx, rdx
    jbe    .LBB7_8
.LBB7_2:
    mov    rcx, rdx
    sub    rcx, rsi
    jae    .LBB7_6
    mov    r8, rsi
    and    r8, 7
    je    .LBB7_5
.LBB7_4:
    movzx    r9d, byte ptr [rdi + rdx]
    xor    rax, r9
    inc    rdx
    dec    r8
    jne    .LBB7_4
.LBB7_5:
    cmp    rcx, -8
    ja    .LBB7_6
.LBB7_18:
    movzx    ecx, byte ptr [rdi + rdx]
    xor    rcx, rax
    movzx    eax, byte ptr [rdi + rdx + 1]
    movzx    r8d, byte ptr [rdi + rdx + 2]
    xor    r8, rax
    xor    r8, rcx
    movzx    eax, byte ptr [rdi + rdx + 3]
    movzx    ecx, byte ptr [rdi + rdx + 4]
    xor    rcx, rax
    movzx    r9d, byte ptr [rdi + rdx + 5]
    xor    r9, rcx
    xor    r9, r8
    movzx    ecx, byte ptr [rdi + rdx + 6]
    movzx    eax, byte ptr [rdi + rdx + 7]
    xor    rax, rcx
    xor    rax, r9
    add    rdx, 8
    cmp    rsi, rdx
    jne    .LBB7_18
.LBB7_6:
    pop    rbx
    pop    r14
    pop    r15
    ret
.LBB7_17:
    lea    rdx, [rip + .Lanon.a270e05f789020653a98a620bea8a67e.11]
    mov    rdi, r8
    call    qword ptr [rip + _RNvNtCscNqnBmBaIcL_4core9panicking18panic_bounds_check@GOTPCREL]
.LBB7_25:
    lea    rdx, [rip + .Lanon.a270e05f789020653a98a620bea8a67e.10]
    mov    rdi, r8
    call    qword ptr [rip + _RNvNtCscNqnBmBaIcL_4core9panicking18panic_bounds_check@GOTPCREL]
.LBB7_24:
    lea    rdx, [rip + .Lanon.a270e05f789020653a98a620bea8a67e.9]
    mov    rdi, r8
    call    qword ptr [rip + _RNvNtCscNqnBmBaIcL_4core9panicking18panic_bounds_check@GOTPCREL]
.LBB7_23:
    lea    rdx, [rip + .Lanon.a270e05f789020653a98a620bea8a67e.8]
    mov    rdi, r8
    call    qword ptr [rip + _RNvNtCscNqnBmBaIcL_4core9panicking18panic_bounds_check@GOTPCREL]
.LBB7_22:
    lea    rdx, [rip + .Lanon.a270e05f789020653a98a620bea8a67e.7]
    mov    rdi, r8
    call    qword ptr [rip + _RNvNtCscNqnBmBaIcL_4core9panicking18panic_bounds_check@GOTPCREL]
.LBB7_21:
    lea    rdx, [rip + .Lanon.a270e05f789020653a98a620bea8a67e.6]
    mov    rdi, r8
    call    qword ptr [rip + _RNvNtCscNqnBmBaIcL_4core9panicking18panic_bounds_check@GOTPCREL]
.LBB7_20:
    lea    rdx, [rip + .Lanon.a270e05f789020653a98a620bea8a67e.5]
    mov    rdi, r8
    call    qword ptr [rip + _RNvNtCscNqnBmBaIcL_4core9panicking18panic_bounds_check@GOTPCREL]
.LBB7_19:
    lea    rdx, [rip + .Lanon.a270e05f789020653a98a620bea8a67e.4]
    mov    rdi, rcx
    call    qword ptr [rip + _RNvNtCscNqnBmBaIcL_4core9panicking18panic_bounds_check@GOTPCREL]

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

Global RankCapsule & DomainHardware _rdtscLatencyThroughputELF .textTernary VoteAuthor Aye
#1638wupz_xor_fold
domain: smart-tree | id: b1b0f9a58585ab9287dc3d2acdbc79f6
277647/20000 cyc/op2644609/400000 ns/op400000000/2644609 ops/us442 B .text (105 insns)+ (1)aye::Hue+Gemini(0+1)::x86_64 @ 432Hz
#1649reference_fold
domain: smart-tree | id: 6ba1e9237f06ee601d37cac7ed14f659
1554087/100000 cyc/op370067/50000 ns/op50000000/370067 ops/us192 B .text (58 insns)+ (1)aye::Hue+Gemini(0+1)::x86_64 @ 432Hz
#1675wupz_xor_fold_bytes (THIS CAPSULE)
domain: 8b-is-x86_64 | id: 6062182496ead4dfeef2de489087d5e2
91627/5000 cyc/op698261/80000 ns/op80000000/698261 ops/us512 B .text (121 insns)+ (1)aye::Hue+Gemini(0+1)::x86_64 @ 432Hz
#1678xor_fold_scalar
domain: smart-tree | id: 578a8eb4d4145dde7f6c8b036ac555f7
3886171/200000 cyc/op3701653/400000 ns/op400000000/3701653 ops/us153 B .text (42 insns)+ (1)aye::Hue+Gemini(0+1)::x86_64 @ 432Hz