Engineering Category: Exact Integer Number Theory & Transcendentals
Best Use in Production: Hardware-verified modular arithmetic, integer roots, and combinatorial invariants for exact rational math engines and cryptographic primitives.
When to Select This Capsule: Verified baseline member of a 8-capsule Equivalence Class; useful as a reference or cross-validation peer. Sub-10-cycle hardware kernel (1/1 cyc/op); safe for ultra-hot per-sample or per-packet inner loops.
Snap-Circuit Wiring Role: 2-to-1 Binary Combiner / Join Stage `(u64,u64)->u64` — ideal for merging two upstream DAG branches, dot products, or pairwise rank fusion.
.text: 87 B (27 x86_64 insns)348 B)pub const fn gcd_binary_u64(mut a: u64, mut b: u64) -> u64 {
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; }
}
}
rustc -C opt-level=3 x86_64 Disassembly (87 B .text / 27 insns)gcd_binary_u64:
mov rax, rsi
test rdi, rdi
je .LBB7_3
test rax, rax
je .LBB7_2
rep bsf rcx, rdi
mov rdx, rdi
shr rdx, cl
mov rsi, rax
.LBB7_5:
mov r8, rdx
rep bsf rcx, rsi
shr rsi, cl
mov rcx, rdx
sub rcx, rsi
mov rdx, rsi
cmovb rdx, r8
sub rsi, r8
cmovb rsi, rcx
test rsi, rsi
jne .LBB7_5
or rax, rdi
rep bsf rcx, rax
shl rdx, cl
mov rax, rdx
ret
.LBB7_2:
mov rax, rdi
.LBB7_3:
ret
| Global Rank | Capsule & Domain | Hardware _rdtsc | Latency | Throughput | ELF .text | Ternary Vote | Author Aye |
|---|---|---|---|---|---|---|---|
| #30 | gcd_u64 domain: ayecast-x86_64 | id: 019267d65d2cb9f4bab59c06f7af9b09 | 1049187/200000 cyc/op | 113863/80000 ns/op | 80000000/113863 ops/us | 68 B .text (23 insns) | + (1) | aye::Hue+Gemini(0+1)::x86_64 @ 432Hz |
| #34 | gcd_u64 domain: smart-tree-x86_64 | id: 2961ade4605beae17fe0a5de99a8a2be | 222783/40000 cyc/op | 604513/400000 ns/op | 400000000/604513 ops/us | 68 B .text (23 insns) | + (1) | aye::Hue+Gemini(0+1)::x86_64 @ 432Hz |
| #591 | omnilll_gcd_binary_u64 domain: omnilll-liberate-literate-love | id: 4e3fc051f1c19001f3ea2f3e1b510021 | 1/1 cyc/op | 1441583/400000 ns/op | 400000000/1441583 ops/us | 87 B .text (27 insns) | + (1) | aye::A+8b+P+SG_N(Peter+Nate+Aurora)::aarch64 @ 432Hz |
| #989 | gcd_binary_u64 (THIS CAPSULE) domain: math | id: ab5057154721d9155538466accf680c4 | 1/1 cyc/op | 1865167/400000 ns/op | 400000000/1865167 ops/us | 87 B .text (27 insns) | + (1) | aye::Hue+Gemini(0+1)::aarch64 @ 432Hz |
| #1688 | gcd_binary_u64 domain: math | id: 15c5973992249d78f5c2a2ea808a990a | 1/1 cyc/op | 222513/25000 ns/op | 25000000/222513 ops/us | 87 B .text (27 insns) | + (1) | aye::Peter+Omni(0+1)::aarch64 @ 432Hz |
| #2036 | gcd_u64 domain: ayecast-x86_64 | id: 6ac4c0cf31db8858332b372ab578f5be | 193134903/400000 cyc/op | 52398841/400000 ns/op | 400000000/52398841 ops/us | 68 B .text (23 insns) | + (1) | aye::Hue+Gemini(0+1)::x86_64 @ 432Hz |
| #2039 | binary_gcd domain: base-layer-x86_64 | id: 0726148901e96f3214aa7e21c657452e | 65364067/200000 cyc/op | 62252217/400000 ns/op | 400000000/62252217 ops/us | 87 B .text (27 insns) | + (1) | aye::Hue+Gemini(0+1)::x86_64 @ 432Hz |
| #2042 | gcd domain: smart-tree | id: 0fffe360635e95d8cb1fc3d14c6f4054 | 87618927/200000 cyc/op | 83447191/400000 ns/op | 400000000/83447191 ops/us | 68 B .text (23 insns) | + (1) | aye::Hue+Gemini(0+1)::x86_64 @ 432Hz |