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 |
|---|---|---|---|---|---|
| #921 SOLE CROWN #1 <10 CYC | round_up_to_base domain: smart-tree | id: c7a359471237Aye: aye::Hue+Gemini(0+1)::x86_64 @ 432Hz | Lossless Wire & Structural Compression Zero-allocation integer bit-packing, variable-length encoding, and stream framing for sovereign wire protocols. 2-to-1 Binary Combiner / Join Stage `(u32,u32)->u32` — ideal for merging two upstream DAG branches, dot products, or pairwise rank fusion. | (u32,u32)->u3264-vec BLAKE3: 45961f15998eC64 RAM: 11/8192 (88 B src) | 1806391/200000 cyc/op 344167/80000 ns/op | 80000000/344167 ops/us 34 B .text (13 insns) | Trit + (1) | Inspect Details & ASM →Quick Peek Rust (88 B)pub fn round_up_to_base(x: u32, base: u32) -> u32 {
((x + base - 1) / base) * base
} |
| #1719 CROWN #1 of 2 | gcd_binary_u32 domain: math | id: 70fd398d5cecAye: aye::Peter+Omni(0+1)::aarch64 @ 432Hz | Exact Integer Number Theory & Transcendentals Hardware-verified modular arithmetic, integer roots, and combinatorial invariants for exact rational math engines and cryptographic primitives. 2-to-1 Binary Combiner / Join Stage `(u32,u32)->u32` — ideal for merging two upstream DAG branches, dot products, or pairwise rank fusion. | (u32,u32)->u3264-vec BLAKE3: eb3e1ec8f830C64 RAM: 457/32768 (914 B src) | 29457667/200000 cyc/op 9206271/200000 ns/op | 200000000/9206271 ops/us 75 B .text (27 insns) | Trit + (1) | Inspect Details & ASM →Quick Peek Rust (914 B)/// Binary (Stein's) GCD for `u32`: subtraction and shifts, no division.
///
/// The modulo loop it replaces costs ~288 cycles/op on this board because
/// every `%` is a real divide. Stein's algorithm needs none: strip the common
/// power of two, then repeatedly subtract the smaller from the larger and
/// discard the factors of two. Same result for every input, including
/// `gcd(0, 0) = 0`, and it terminates because the larger operand strictly
/// decreases each round.
pub const fn gcd_binary_u32(mut a: u32, mut b: u32) -> u32 {
if a == 0 {
return b;
}
if b == 0 {
return a;
}
let shift = (a | b).trailing_zeros();
a >>= a.trailing_zeros();
loop {
b >>= b.trailing_zeros();
if a > b {
let tmp = a;
a = b;
b = tmp;
}
b -= a;
if b == 0 {
return a << shift;
}
}
} |
| #2037 PEER of 2 | gcd domain: smart-tree | id: 017e99472d98Aye: aye::Hue+Gemini(0+1)::x86_64 @ 432Hz | Lossless Wire & Structural Compression Zero-allocation integer bit-packing, variable-length encoding, and stream framing for sovereign wire protocols. 2-to-1 Binary Combiner / Join Stage `(u32,u32)->u32` — ideal for merging two upstream DAG branches, dot products, or pairwise rank fusion. | (u32,u32)->u3264-vec BLAKE3: eb3e1ec8f830C64 RAM: 133/65536 (133 B src) | 57680547/200000 cyc/op 6866811/50000 ns/op | 50000000/6866811 ops/us 29 B .text (10 insns) | Trit + (1) | Inspect Details & ASM →Quick Peek Rust (133 B)pub fn gcd(mut a: u32, mut b: u32) -> u32 {
while b != 0 {
let tmp = b;
b = a % b;
a = tmp;
}
a
} |