Best Use & Engineering Application Guide

Engineering Category: Cryptographic Mixing, Checksums & Wire Integrity

Best Use in Production: High-avalanche 64-bit bijection mixing, deterministic PRNG state stepping, and keyed hash partitioning for hash tables and content addressing.

When to Select This Capsule: Sole canonical implementation for its 64-vector functional equivalence class. Sub-10-cycle hardware kernel (982399/200000 cyc/op); safe for ultra-hot per-sample or per-packet inner loops.

Snap-Circuit Wiring Role: Specialized Multi-Pin Stage `(u64,u64)->u32` — wire matching input pins via `snap_dag` or `snap_pipeline`.

Hardware _rdtsc: 982399/200000 cycles/op
Latency: 133267/100000 ns/op
Throughput: 100000000/133267 ops/us
Compiled ELF64 .text: 100 B (23 x86_64 insns)
C64 64KB RAM Budget: 107/65536 (107 B source)
Ternary Vote: + (score 1) | Salience: 800/9
Pure-Rust Capsule Source Code (107 B)
pub const fn simhash_matching_bits_64(a: u64, b: u64) -> u32 { 64u32.saturating_sub((a ^ b).count_ones()) }
rustc -C opt-level=3 x86_64 Disassembly (100 B .text / 23 insns)
simhash_matching_bits_64:
    xor    rdi, rsi
    mov    rax, rdi
    shr    rax
    movabs    rcx, 6148914691236517205
    and    rcx, rax
    sub    rdi, rcx
    movabs    rax, 3689348814741910323
    mov    rcx, rdi
    and    rcx, rax
    shr    rdi, 2
    and    rdi, rax
    add    rdi, rcx
    mov    rax, rdi
    shr    rax, 4
    add    rax, rdi
    movabs    rcx, 1085102592571150095
    and    rcx, rax
    movabs    rdx, 72340172838076673
    imul    rdx, rcx
    shr    rdx, 56
    mov    eax, 64
    sub    eax, edx
    ret

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

Global RankCapsule & DomainHardware _rdtscLatencyThroughputELF .textTernary VoteAuthor Aye
#23simhash_matching_bits_64 (THIS CAPSULE)
domain: ayecast-x86_64 | id: c8465faadd40aa45d21d8ea9a29db1b7
982399/200000 cyc/op133267/100000 ns/op100000000/133267 ops/us100 B .text (23 insns)+ (1)aye::Hue+Gemini(0+1)::x86_64 @ 432Hz