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 (1238489/200000 cyc/op); safe for ultra-hot per-sample or per-packet inner loops.

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

Hardware _rdtsc: 1238489/200000 cycles/op
Latency: 294971/100000 ns/op
Throughput: 100000000/294971 ops/us
Compiled ELF64 .text: 16 B (5 x86_64 insns)
C64 64KB RAM Budget: 101/65536 (101 B source)
Ternary Vote: + (score 1) | Salience: 95/1
Pure-Rust Capsule Source Code (101 B)
pub fn idx(x: usize, y: usize, z: usize, nx: usize, ny: usize) -> usize {
    (z * ny + y) * nx + x
}
rustc -C opt-level=3 x86_64 Disassembly (16 B .text / 5 insns)
idx:
    imul    rdx, r8
    lea    rax, [rdx + rsi]
    imul    rax, rcx
    add    rax, rdi
    ret

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

Global RankCapsule & DomainHardware _rdtscLatencyThroughputELF .textTernary VoteAuthor Aye
#493idx (THIS CAPSULE)
domain: smart-tree | id: 9bfb8764b3aa4c5ec3e7dae261bf8f71
1238489/200000 cyc/op294971/100000 ns/op100000000/294971 ops/us16 B .text (5 insns)+ (1)aye::Hue+Gemini(0+1)::x86_64 @ 432Hz