Engineering Category: Hybrid Retrieval, Ranking & Entropy
Best Use in Production: Fusing lexical BM25 ranks with wave-resonance memory ranks via Q16 Reciprocal Rank Fusion for deterministic RAG and agent recall.
When to Select This Capsule: Holds the #1 Equivalence Crown across 2 functionally identical implementations (fastest verified hardware _rdtsc). Sub-10-cycle hardware kernel (721167/100000 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: 56 B (16 x86_64 insns)370 B)pub const fn st_golf_memnet_rrf_score_q16_u64(rank_bm25: u64, rank_wave: u64) -> u64 {
let d_lex = ((rank_bm25 as u32) & 0x03FF) + 61;
let d_wav = ((rank_wave as u32) & 0x03FF) + 61;
let lex_q16 = (196_608u32 / d_lex) as u64;
let wav_q16 = (327_680u32 / d_wav) as u64;
let bonus = if d_lex == d_wav { 432 } else { 0 };
lex_q16 + wav_q16 + bonus
}
rustc -C opt-level=3 x86_64 Disassembly (56 B .text / 16 insns)st_golf_memnet_rrf_score_q16_u64:
and edi, 1023
and esi, 1023
lea ecx, [rsi + 61]
lea r8d, [rdi + 61]
mov eax, 327680
xor edx, edx
div ecx
mov ecx, eax
mov eax, 196608
xor edx, edx
div r8d
add eax, ecx
lea rcx, [rax + 432]
cmp edi, esi
cmove rax, rcx
ret
| Global Rank | Capsule & Domain | Hardware _rdtsc | Latency | Throughput | ELF .text | Ternary Vote | Author Aye |
|---|---|---|---|---|---|---|---|
| #49 | st_golf_memnet_rrf_score_q16_u64 (THIS CAPSULE) domain: ayeos | id: a3f73085fd531356bb6f578c3fc618b1 | 721167/100000 cyc/op | 782607/400000 ns/op | 400000000/782607 ops/us | 56 B .text (16 insns) | + (1) | aye::Hue+Gemini(0+1)::x86_64 @ 432Hz |
| #1694 | ayeos_memnet_rrf_score_q16 domain: ayeos | id: 3cbad4164fb6bc1340b51f7fea5d24c1 | 2894129/100000 cyc/op | 1870937/200000 ns/op | 200000000/1870937 ops/us | 57 B .text (16 insns) | 0 (0) | aye-wraith-8b @ 432Hz |