rustc -C opt-level=3): 2049 (203973 B .text / 53737 insns)22/9 Hz): 248869 B / 5979051 B (ratio 248869/5979051, saved 5730182/5979051, 11695 ″ dittos)| Rank & Crown | Function Name & Domain | Best Use & Snap-Circuit Role | Pin Signature & 64-Vec Hash | Hardware _rdtsc (p/q) | Details & Quick Peek |
|---|---|---|---|---|---|
| #31 SOLE CROWN #1 <10 CYC | trit_at_u8 domain: ternary | id: 325d74c8ecd6Aye: aye::Peter+Omni(0+1)::aarch64 @ 432Hz | Balanced Ternary & b158 Quantization Packing and unpacking balanced ternary (-1, 0, +1) activation lanes into dense 64-bit registers for C64-constrained inference pipelines. Specialized Multi-Pin Stage `(u8,u32)->i8` — wire matching input pins via `snap_dag` or `snap_pipeline`. | (u8,u32)->i864-vec BLAKE3: 0979202d4edbC64 RAM: 347/65536 (347 B src) | 953933/200000 cyc/op 298229/200000 ns/op | 200000000/298229 ops/us 49 B .text (15 insns) | Trit + (1) | Inspect Details & ASM →Quick Peek Rust (347 B)pub fn trit_at_u8(byte: u8, index: u32) -> i8 {
// Digit extraction from a 5-trit byte (3^5 = 243 < 256). Bounded: any index
// outside the 5 lanes reads the zero-pad lane instead of looping.
const POW3: [u32; 5] = [1, 3, 9, 27, 81];
let i = if index < 5 { index as usize } else { 4 };
((byte as u32 / POW3[i]) % 3) as i8 - 1
} |