Engineering Category: Hybrid Retrieval, Ranking & Entropy
Best Use in Production: Branchless integer similarity scoring, edit-distance evaluation, and candidate ranking for high-throughput retrieval pipelines.
When to Select This Capsule: Sole canonical implementation for its 64-vector functional equivalence class. Sub-10-cycle hardware kernel (1/1 cyc/op); safe for ultra-hot per-sample or per-packet inner loops.
Snap-Circuit Wiring Role: Specialized Multi-Pin Stage `(u64,u64,u64,u64)->u64` — wire matching input pins via `snap_dag` or `snap_pipeline`.
.text: 110 B (31 x86_64 insns)380 B)pub fn ayeos_pxe_lease_ipv4_u32(subnet_u32: u64, mac_low24: u64, start_octet: u64, end_octet: u64) -> u64 {
let lo = start_octet.min(254);
let hi = end_octet.clamp(lo, 254);
let span = (hi - lo) + 1;
let folded = (mac_low24 ^ (mac_low24 >> 8) ^ (mac_low24 >> 16)) & 0xFFFF_FFFF;
let host = lo + (folded % span);
(subnet_u32 & 0xFFFF_FF00) | (host & 0xFF)
}
rustc -C opt-level=3 x86_64 Disassembly (110 B .text / 31 insns)ayeos_pxe_lease_ipv4_u32:
cmp rdx, 254
mov eax, 254
mov r8d, 254
cmovb r8, rdx
cmp rcx, r8
cmovb rcx, rdx
cmp rcx, 254
cmovae rcx, rax
sub rcx, r8
inc rcx
je .LBB7_4
mov rax, rsi
shr rax, 8
mov rdx, rsi
shr rdx, 16
xor edx, eax
xor esi, edx
cmp rsi, rcx
jb .LBB7_3
mov eax, esi
xor edx, edx
div ecx
mov esi, edx
.LBB7_3:
add esi, r8d
and edi, -256
movzx eax, sil
or rax, rdi
ret
.LBB7_4:
push rax
lea rdi, [rip + .Lanon.a270e05f789020653a98a620bea8a67e.4]
call qword ptr [rip + _RNvNtNtCscNqnBmBaIcL_4core9panicking11panic_const23panic_const_rem_by_zero@GOTPCREL]
| Global Rank | Capsule & Domain | Hardware _rdtsc | Latency | Throughput | ELF .text | Ternary Vote | Author Aye |
|---|---|---|---|---|---|---|---|
| #1439 | ayeos_pxe_lease_ipv4_u32 (THIS CAPSULE) domain: ayeos-rpi | id: 33bbdbe327de29807f87edf02cc09f5c | 1/1 cyc/op | 1682333/400000 ns/op | 400000000/1682333 ops/us | 110 B .text (31 insns) | + (1) | aye::Peter+Omni(0+1)::aarch64 @ 432Hz |