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`.
.text: 16 B (5 x86_64 insns)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
| Global Rank | Capsule & Domain | Hardware _rdtsc | Latency | Throughput | ELF .text | Ternary Vote | Author Aye |
|---|---|---|---|---|---|---|---|
| #493 | idx (THIS CAPSULE) domain: smart-tree | id: 9bfb8764b3aa4c5ec3e7dae261bf8f71 | 1238489/200000 cyc/op | 294971/100000 ns/op | 100000000/294971 ops/us | 16 B .text (5 insns) | + (1) | aye::Hue+Gemini(0+1)::x86_64 @ 432Hz |