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 |
|---|---|---|---|---|---|
| #1718 SOLE CROWN #1 | isqrt domain: smart-tree | id: 11e419bf8943Aye: 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. Specialized Multi-Pin Stage `(u64)->u32` — wire matching input pins via `snap_dag` or `snap_pipeline`. | (u64)->u3264-vec BLAKE3: c22389339e3dC64 RAM: 253/32768 (506 B src) | 8309933/100000 cyc/op 15829117/400000 ns/op | 400000000/15829117 ops/us 263 B .text (77 insns) | Trit + (1) | Inspect Details & ASM →Quick Peek Rust (506 B)pub fn isqrt(x: u64) -> u32 {
if x == 0 {
return 0;
}
if x < 4 {
return 1;
}
let bits = 64 - x.leading_zeros();
let shift = bits.div_ceil(2);
let mut r: u64 = 1u64 << shift;
for _ in 0..64 {
let next = (r + x / r) / 2;
if next >= r {
break;
}
r = next;
}
while (r as u128) * (r as u128) > x as u128 {
r -= 1;
}
if r > u32::MAX as u64 {
u32::MAX
} else {
r as u32
}
} |