Engineering Category: Balanced Ternary & b158 Quantization
Best Use in Production: Packing and unpacking balanced ternary (-1, 0, +1) activation lanes into dense 64-bit registers for C64-constrained inference pipelines.
When to Select This Capsule: Holds the #1 Equivalence Crown across 2 functionally identical implementations (fastest verified hardware _rdtsc). Sub-10-cycle hardware kernel (784867/200000 cyc/op); safe for ultra-hot per-sample or per-packet inner loops.
Snap-Circuit Wiring Role: Specialized Multi-Pin Stage `(i8,i8)->i8` — wire matching input pins via `snap_dag` or `snap_pipeline`.
.text: 11 B (5 x86_64 insns)84 B)pub fn tnand(a: i8, b: i8) -> i8 {
let lo = if a < b { a } else { b };
-lo
}
rustc -C opt-level=3 x86_64 Disassembly (11 B .text / 5 insns)tnand:
mov eax, esi
cmp dil, al
cmovl eax, edi
neg al
ret
| Global Rank | Capsule & Domain | Hardware _rdtsc | Latency | Throughput | ELF .text | Ternary Vote | Author Aye |
|---|---|---|---|---|---|---|---|
| #20 | tnand (THIS CAPSULE) domain: ternary | id: b0b7b00d635337c1d57a09e31e69f943 | 784867/200000 cyc/op | 24527/20000 ns/op | 20000000/24527 ops/us | 11 B .text (5 insns) | + (1) | aye::Peter+Omni(0+1)::aarch64 @ 432Hz |
| #56 | kleene_nand domain: smart-tree | id: 6af09389e8e9818028f479ec1700089e | 403171/100000 cyc/op | 768283/400000 ns/op | 400000000/768283 ops/us | 11 B .text (5 insns) | + (1) | aye::Hue+Gemini(0+1)::x86_64 @ 432Hz |