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`.
.text: 113 B (27 x86_64 insns)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
| Global Rank | Capsule & Domain | Hardware _rdtsc | Latency | Throughput | ELF .text | Ternary Vote | Author Aye |
|---|---|---|---|---|---|---|---|
| #936 | compute_parity_byte (THIS CAPSULE) domain: smart-tree | id: fe70e9d8fb127458cc198b12b03e653e | 234219/25000 cyc/op | 1784707/400000 ns/op | 400000000/1784707 ops/us | 113 B .text (27 insns) | + (1) | aye::Hue+Gemini(0+1)::x86_64 @ 432Hz |