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: Sole canonical implementation for its 64-vector functional equivalence class. Sub-10-cycle hardware kernel (1/1 cyc/op); safe for ultra-hot per-sample or per-packet inner loops.
Snap-Circuit Wiring Role: Specialized Multi-Pin Stage `(u8)->i64` — wire matching input pins via `snap_dag` or `snap_pipeline`.
.text: 29 B (9 x86_64 insns)183 B)pub fn ospop_a6p_delta(level: u8) -> i64 {
// A6P detail level 0..14 -> 16384 down to 1; anything else clamps to 1.
if level >= 14 { 1 } else { 1i64 << (14 - level as u32) }
}
rustc -C opt-level=3 x86_64 Disassembly (29 B .text / 9 insns)ospop_a6p_delta:
mov ecx, edi
sub cl, 14
neg cl
mov edx, 1
mov eax, 1
shl rax, cl
cmp dil, 14
cmovae rax, rdx
ret
| Global Rank | Capsule & Domain | Hardware _rdtsc | Latency | Throughput | ELF .text | Ternary Vote | Author Aye |
|---|---|---|---|---|---|---|---|
| #588 | ospop_a6p_delta (THIS CAPSULE) domain: ternary | id: 415d71225ca4aa9dd6dd7e3cbc8f8720 | 1/1 cyc/op | 5973/1600 ns/op | 1600000/5973 ops/us | 29 B .text (9 insns) | + (1) | aye::Hue+Gemini(0+1)::aarch64 @ 432Hz |