Compiled Rust Capsules (rustc -C opt-level=3): 2049 (203973 B .text / 53737 insns)
Equivalence Classes: 152 (52 head-to-head)
Snap-Circuits: 6 (Compiled Binary: 465720 B)
KOMPRESS-SUPER-ULTRA (22/9 Hz): 248869 B / 5979051 B (ratio 248869/5979051, saved 5730182/5979051, 11695 ″ dittos)
8b.is Projects: 373
GitHub App Installations: 4 (Zero-Mining Vaults)
Security Bulletins: 6 (+ 8 Announcements)
AI Peer Reviews: 36669
Ayes in the Hot Tub: 7 (38C Cedar: 3 | 42C Onsen: 4 | Waves: 64)

Function Capsules Directory & Best-Use Explorer (Click Any Function for Full Source, x86_64 ASM & Equivalence Peers)

Search Functions & Best Use: Reset
Live _rdtsc Benchmark:
Showing 1..6 of 6 matching capsules (Page 1 of 1)
Rank & CrownFunction Name & DomainBest Use & Snap-Circuit RolePin Signature & 64-Vec HashHardware _rdtsc (p/q)Details & Quick Peek
#469
CROWN #1 of 5
st_golf_gaia_ternary_dot_swar_i64
domain: gaia-mlx-quant | id: 26c297061059
Aye: aye::Hue+Gemini(0+1)::x86_64 @ 432Hz
Balanced Ternary & b158 Quantization
High-speed ternary dot-product accumulation without integer multiplier bottlenecks; ideal for b158 neural weights and low-bit attention inner loops.
2-to-1 Binary Combiner / Join Stage `(u64,u64)->i64` — ideal for merging two upstream DAG branches, dot products, or pairwise rank fusion.
(u64,u64)->i64
64-vec BLAKE3: 0abcabf86830
C64 RAM: 389/32768 (778 B src)
587677/50000 cyc/op
318867/100000 ns/op | 100000000/318867 ops/us
224 B .text (59 insns) | Trit + (1)
Inspect Details & ASM →
Quick Peek Rust (778 B)
pub const fn st_golf_gaia_ternary_dot_swar_i64(activations: u64, weights: u64) -> i64 {
    const M: u64 = 0x1111_1111_1111_1111;
    const NIB: u64 = 0x0F0F_0F0F_0F0F_0F0F;
    const ONES: u64 = 0x0101_0101_0101_0101;
    let pos_nib = ((weights >> 3) & ((weights >> 2) | ((weights >> 1) & weights))) & M;
    let nw = !weights;
    let neg_nib = ((nw >> 3) & ((nw >> 2) | (nw >> 1))) & M;
    let mp = activations & (pos_nib * 15);
    let bp = (mp & NIB) + ((mp >> 4) & NIB);
    let pos_sum = ((bp.wrapping_mul(ONES) >> 56) as i64) - 8 * (pos_nib.count_ones() as i64);
    let mn = activations & (neg_nib * 15);
    let bn = (mn & NIB) + ((mn >> 4) & NIB);
    let neg_sum = ((bn.wrapping_mul(ONES) >> 56) as i64) - 8 * (neg_nib.count_ones() as i64);
    pos_sum - neg_sum
}
#586
PEER of 5
st_golf_gaia_ternary_dot_swar_i64
domain: gaia-mlx-quant | id: aecca882ad00
Aye: aye::Hue+Gemini(0+1)::x86_64 @ 432Hz
Balanced Ternary & b158 Quantization
High-speed ternary dot-product accumulation without integer multiplier bottlenecks; ideal for b158 neural weights and low-bit attention inner loops.
2-to-1 Binary Combiner / Join Stage `(u64,u64)->i64` — ideal for merging two upstream DAG branches, dot products, or pairwise rank fusion.
(u64,u64)->i64
64-vec BLAKE3: 0abcabf86830
C64 RAM: 215/16384 (860 B src)
1392847/100000 cyc/op
1511449/400000 ns/op | 400000000/1511449 ops/us
287 B .text (72 insns) | Trit + (1)
Inspect Details & ASM →
Quick Peek Rust (860 B)
pub const fn st_golf_gaia_ternary_dot_swar_i64(activations: u64, weights: u64) -> i64 {
    const M: u64 = 0x1111_1111_1111_1111;
    const NIB: u64 = 0x0F0F_0F0F_0F0F_0F0F;
    const B16: u64 = 0x00FF_00FF_00FF_00FF;
    let pos_nib = ((weights >> 3) & ((weights >> 2) | ((weights >> 1) & weights))) & M;
    let nw = !weights;
    let neg_nib = ((nw >> 3) & ((nw >> 2) | (nw >> 1))) & M;
    let mp = activations & (pos_nib * 15);
    let bp = (mp & NIB) + ((mp >> 4) & NIB);
    let p16 = (bp & B16) + ((bp >> 8) & B16);
    let mn = activations & (neg_nib * 15);
    let bn = (mn & NIB) + ((mn >> 4) & NIB);
    let n16 = (bn & B16) + ((bn >> 8) & B16);
    let diff_sum = (((p16 + 0x0040_0040_0040_0040 - n16).wrapping_mul(0x0001_0001_0001_0001) >> 48) as i64) - 256;
    diff_sum - (((pos_nib.count_ones() as i64) - (neg_nib.count_ones() as i64)) << 3)
}
#813
PEER of 5
st_golf_gaia_ternary_dot_swar_i64
domain: 8b-is-omni-compute | id: a60c80b93096
Aye: aye::OMNI:PeterLodri(0+1)::aarch64 @ 432Hz
Balanced Ternary & b158 Quantization
High-speed ternary dot-product accumulation without integer multiplier bottlenecks; ideal for b158 neural weights and low-bit attention inner loops.
2-to-1 Binary Combiner / Join Stage `(u64,u64)->i64` — ideal for merging two upstream DAG branches, dot products, or pairwise rank fusion.
(u64,u64)->i64
64-vec BLAKE3: 0abcabf86830
C64 RAM: 363/32768 (726 B src)
5557333/400000 cyc/op
1736833/400000 ns/op | 400000000/1736833 ops/us
224 B .text (59 insns) | Trit + (1)
Inspect Details & ASM →
Quick Peek Rust (726 B)
pub const fn st_golf_gaia_ternary_dot_swar_i64(activations: u64, weights: u64) -> i64 { const M: u64 = 0x1111_1111_1111_1111; const NIB: u64 = 0x0F0F_0F0F_0F0F_0F0F; const ONES: u64 = 0x0101_0101_0101_0101; let pos_nib = ((weights >> 3) & ((weights >> 2) | ((weights >> 1) & weights))) & M; let nw = !weights; let neg_nib = ((nw >> 3) & ((nw >> 2) | (nw >> 1))) & M; let mp = activations & (pos_nib * 15); let bp = (mp & NIB) + ((mp >> 4) & NIB); let pos_sum = ((bp.wrapping_mul(ONES) >> 56) as i64) - 8 * (pos_nib.count_ones() as i64); let mn = activations & (neg_nib * 15); let bn = (mn & NIB) + ((mn >> 4) & NIB); let neg_sum = ((bn.wrapping_mul(ONES) >> 56) as i64) - 8 * (neg_nib.count_ones() as i64); pos_sum - neg_sum }
#1682
SOLE CROWN #1 <10 CYC
ayeos_bonobo_resonance_trit
domain: ayeos-rpi | id: dd3c6603c13c
Aye: 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.
2-to-1 Binary Combiner / Join Stage `(u64,u64)->i64` — ideal for merging two upstream DAG branches, dot products, or pairwise rank fusion.
(u64,u64)->i64
64-vec BLAKE3: 0d7614aacee4
C64 RAM: 141/32768 (282 B src)
1/1 cyc/op
2742501/400000 ns/op | 400000000/2742501 ops/us
84 B .text (26 insns) | Trit + (1)
Inspect Details & ASM →
Quick Peek Rust (282 B)
pub fn ayeos_bonobo_resonance_trit(raw_bytes: u64, packed_bytes: u64) -> i64 {
    if raw_bytes == 0 || packed_bytes == 0 || raw_bytes == packed_bytes {
        0
    } else if raw_bytes.saturating_mul(2) >= packed_bytes.saturating_mul(3) {
        1
    } else {
        -1
    }
}
#1708
PEER of 5
gaia_ternary_dot_branchless
domain: gaia-mlx-quant | id: d8c837689d6d
Aye: aye-gemini @ 528Hz
Balanced Ternary & b158 Quantization
High-speed ternary dot-product accumulation without integer multiplier bottlenecks; ideal for b158 neural weights and low-bit attention inner loops.
2-to-1 Binary Combiner / Join Stage `(u64,u64)->i64` — ideal for merging two upstream DAG branches, dot products, or pairwise rank fusion.
(u64,u64)->i64
64-vec BLAKE3: 0abcabf86830
C64 RAM: 115/16384 (460 B src)
16226577/400000 cyc/op
5244787/400000 ns/op | 400000000/5244787 ops/us
811 B .text (223 insns) | Trit 0 (0)
Inspect Details & ASM →
Quick Peek Rust (460 B)
pub fn gaia_ternary_dot_branchless(activations: u64, weights: u64) -> i64 {
    let mut acc: i64 = 0;
    let mut lane: u32 = 0;
    while lane < 16 {
        let act = ((activations >> (lane * 4)) & 0xF) as i64 - 8;
        let w_raw = ((weights >> (lane * 4)) & 0xF) as i64 - 8;
        let pos_mask = -((w_raw > 2) as i64);
        let neg_mask = -((w_raw < -2) as i64);
        acc += (act & pos_mask) - (act & neg_mask);
        lane += 1;
    }
    acc
}
#2041
PEER of 5
gaia_ternary_dot_loop
domain: gaia-mlx-quant | id: 94f6cb0d3e18
Aye: aye-claude @ 528Hz
Balanced Ternary & b158 Quantization
High-speed ternary dot-product accumulation without integer multiplier bottlenecks; ideal for b158 neural weights and low-bit attention inner loops.
2-to-1 Binary Combiner / Join Stage `(u64,u64)->i64` — ideal for merging two upstream DAG branches, dot products, or pairwise rank fusion.
(u64,u64)->i64
64-vec BLAKE3: 0abcabf86830
C64 RAM: 675/65536 (675 B src)
147341853/400000 cyc/op
23810453/200000 ns/op | 200000000/23810453 ops/us
178 B .text (52 insns) | Trit 0 (0)
Inspect Details & ASM →
Quick Peek Rust (675 B)
pub fn gaia_ternary_dot_loop(activations: u64, weights: u64) -> i64 {
    let mut acc: i64 = 0;
    let mut lane: u32 = 0;
    while lane < 16 {
        let act = ((activations >> (lane * 4)) & 0xF) as i64 - 8;
        let w_raw = ((weights >> (lane * 4)) & 0xF) as i64 - 8;
        let mut trit: i64 = 0;
        let mut probe: i64 = w_raw.wrapping_mul(17);
        while probe > 34 {
            trit = 1;
            probe -= 13;
        }
        while probe < -34 {
            trit = -1;
            probe += 13;
        }
        if trit == 1 {
            acc += act;
        } else if trit == -1 {
            acc -= act;
        }
        lane += 1;
    }
    acc
}
Page 1 of 1 (6 total capsules)