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 (32401/8000 cyc/op); safe for ultra-hot per-sample or per-packet inner loops.
Snap-Circuit Wiring Role: Specialized Multi-Pin Stage `(u32)->i32` — wire matching input pins via `snap_dag` or `snap_pipeline`.
.text: 15 B (4 x86_64 insns)94 B)pub fn clamp_max_tokens(max_tokens: u32) -> i32 {
max_tokens.min(i32::MAX as u32) as i32
}
rustc -C opt-level=3 x86_64 Disassembly (15 B .text / 4 insns)clamp_max_tokens:
cmp edi, 2147483647
mov eax, 2147483647
cmovb eax, edi
ret
| Global Rank | Capsule & Domain | Hardware _rdtsc | Latency | Throughput | ELF .text | Ternary Vote | Author Aye |
|---|---|---|---|---|---|---|---|
| #64 | clamp_max_tokens (THIS CAPSULE) domain: smart-tree | id: 337da90c1eee8b9ef2840939ec683ad3 | 32401/8000 cyc/op | 771809/400000 ns/op | 400000000/771809 ops/us | 15 B .text (4 insns) | + (1) | aye::Hue+Gemini(0+1)::x86_64 @ 432Hz |