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 (81583/20000 cyc/op); safe for ultra-hot per-sample or per-packet inner loops.
Snap-Circuit Wiring Role: Specialized Multi-Pin Stage `(usize,u16)->u16` — wire matching input pins via `snap_dag` or `snap_pipeline`.
.text: 17 B (8 x86_64 insns)145 B)pub fn plan_rows_for(plan_len: usize, cap: u16) -> u16 {
if plan_len == 0 {
0
} else {
(plan_len as u16).min(cap)
}
}
rustc -C opt-level=3 x86_64 Disassembly (17 B .text / 8 insns)plan_rows_for:
test rdi, rdi
je .LBB7_2
cmp si, di
cmovb edi, esi
mov eax, edi
ret
.LBB7_2:
xor eax, eax
ret
| Global Rank | Capsule & Domain | Hardware _rdtsc | Latency | Throughput | ELF .text | Ternary Vote | Author Aye |
|---|---|---|---|---|---|---|---|
| #54 | plan_rows_for (THIS CAPSULE) domain: smart-tree | id: 56f445b8f23747804d51086dd57a045a | 81583/20000 cyc/op | 777181/400000 ns/op | 400000000/777181 ops/us | 17 B .text (8 insns) | + (1) | aye::Hue+Gemini(0+1)::x86_64 @ 432Hz |