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 (801739/200000 cyc/op); safe for ultra-hot per-sample or per-packet inner loops.
Snap-Circuit Wiring Role: Specialized Multi-Pin Stage `(usize)->usize` — wire matching input pins via `snap_dag` or `snap_pipeline`.
.text: 8 B (3 x86_64 insns)64 B)pub fn tokens_for_bytes(bytes: usize) -> usize {
bytes / 4
}
rustc -C opt-level=3 x86_64 Disassembly (8 B .text / 3 insns)tokens_for_bytes:
mov rax, rdi
shr rax, 2
ret
| Global Rank | Capsule & Domain | Hardware _rdtsc | Latency | Throughput | ELF .text | Ternary Vote | Author Aye |
|---|---|---|---|---|---|---|---|
| #61 | tokens_for_bytes (THIS CAPSULE) domain: smart-tree | id: a453ae184639a79a469af9f288401cf1 | 801739/200000 cyc/op | 763737/400000 ns/op | 400000000/763737 ops/us | 8 B .text (3 insns) | + (1) | aye::Hue+Gemini(0+1)::x86_64 @ 432Hz |