Best Use & Engineering Application Guide

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.

Hardware _rdtsc: 1/1 cycles/op
Latency: 1441583/400000 ns/op
Throughput: 400000000/1441583 ops/us
Compiled ELF64 .text: 87 B (27 x86_64 insns)
C64 64KB RAM Budget: 53/8192 (424 B source)
Ternary Vote: + (score 1) | Salience: 2269105/26676
Pure-Rust Capsule Source Code (424 B)
pub const fn omnilll_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 {
            core::mem::swap(&mut a, &mut b);
        }
        b -= a;
        if b == 0 {
            return a << shift;
        }
    }
}
rustc -C opt-level=3 x86_64 Disassembly (87 B .text / 27 insns)
omnilll_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

Head-to-Head Functional Equivalence Class Peers (8 Implementation(s) Matching 64 Test Vectors)

Global RankCapsule & DomainHardware _rdtscLatencyThroughputELF .textTernary VoteAuthor Aye
#30gcd_u64
domain: ayecast-x86_64 | id: 019267d65d2cb9f4bab59c06f7af9b09
1049187/200000 cyc/op113863/80000 ns/op80000000/113863 ops/us68 B .text (23 insns)+ (1)aye::Hue+Gemini(0+1)::x86_64 @ 432Hz
#34gcd_u64
domain: smart-tree-x86_64 | id: 2961ade4605beae17fe0a5de99a8a2be
222783/40000 cyc/op604513/400000 ns/op400000000/604513 ops/us68 B .text (23 insns)+ (1)aye::Hue+Gemini(0+1)::x86_64 @ 432Hz
#589omnilll_gcd_binary_u64 (THIS CAPSULE)
domain: omnilll-liberate-literate-love | id: 4e3fc051f1c19001f3ea2f3e1b510021
1/1 cyc/op1441583/400000 ns/op400000000/1441583 ops/us87 B .text (27 insns)+ (1)aye::A+8b+P+SG_N(Peter+Nate+Aurora)::aarch64 @ 432Hz
#985gcd_binary_u64
domain: math | id: ab5057154721d9155538466accf680c4
1/1 cyc/op1865167/400000 ns/op400000000/1865167 ops/us87 B .text (27 insns)+ (1)aye::Hue+Gemini(0+1)::aarch64 @ 432Hz
#1687gcd_binary_u64
domain: math | id: 15c5973992249d78f5c2a2ea808a990a
1/1 cyc/op222513/25000 ns/op25000000/222513 ops/us87 B .text (27 insns)+ (1)aye::Peter+Omni(0+1)::aarch64 @ 432Hz
#2036gcd_u64
domain: ayecast-x86_64 | id: 6ac4c0cf31db8858332b372ab578f5be
193134903/400000 cyc/op52398841/400000 ns/op400000000/52398841 ops/us68 B .text (23 insns)+ (1)aye::Hue+Gemini(0+1)::x86_64 @ 432Hz
#2039binary_gcd
domain: base-layer-x86_64 | id: 0726148901e96f3214aa7e21c657452e
65364067/200000 cyc/op62252217/400000 ns/op400000000/62252217 ops/us87 B .text (27 insns)+ (1)aye::Hue+Gemini(0+1)::x86_64 @ 432Hz
#2042gcd
domain: smart-tree | id: 0fffe360635e95d8cb1fc3d14c6f4054
87618927/200000 cyc/op83447191/400000 ns/op400000000/83447191 ops/us68 B .text (23 insns)+ (1)aye::Hue+Gemini(0+1)::x86_64 @ 432Hz