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: Verified baseline member of a 2-capsule Equivalence Class; useful as a reference or cross-validation peer. Low-latency L1-resident kernel (2894129/100000 cyc/op); well-suited for high-frequency pipeline stages.
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: 57 B (16 x86_64 insns)454 B)pub fn ayeos_memnet_rrf_score_q16(rank_bm25: u64, rank_wave: u64) -> u64 {
const RRF_K: u64 = 60;
const Q16_ONE: u64 = 65_536;
let r_lex = (rank_bm25 & 0x03FF).saturating_add(1);
let r_wav = (rank_wave & 0x03FF).saturating_add(1);
let lex_q16 = (Q16_ONE * 3) / (RRF_K + r_lex);
let wav_q16 = (Q16_ONE * 5) / (RRF_K + r_wav);
let harmonic_bonus = if r_lex == r_wav { 432 } else { 0 };
(lex_q16 + wav_q16) + harmonic_bonus
}
rustc -C opt-level=3 x86_64 Disassembly (57 B .text / 16 insns)ayeos_memnet_rrf_score_q16:
and edi, 1023
and esi, 1023
lea ecx, [rsi + 61]
mov eax, 327680
xor edx, edx
div ecx
mov ecx, eax
lea r8d, [rdi + 61]
mov eax, 196608
xor edx, edx
div r8d
add eax, ecx
lea rcx, [rax + 432]
cmp rdi, rsi
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 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 (THIS CAPSULE) 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 |