Engineering Category: Lossless Wire & Structural Compression
Best Use in Production: Zero-allocation integer bit-packing, variable-length encoding, and stream framing for sovereign wire protocols.
When to Select This Capsule: Sole canonical implementation for its 64-vector functional equivalence class. Sub-10-cycle hardware kernel (160353/40000 cyc/op); safe for ultra-hot per-sample or per-packet inner loops.
Snap-Circuit Wiring Role: Specialized Multi-Pin Stage `(u32)->i16` — wire matching input pins via `snap_dag` or `snap_pipeline`.
.text: 21 B (7 x86_64 insns)127 B)pub fn rssi_from_raw(raw: u32) -> i16 {
if raw == 99 || raw == 0 {
return -120;
}
-113 + (raw as i16 * 2)
}
rustc -C opt-level=3 x86_64 Disassembly (21 B .text / 7 insns)rssi_from_raw:
mov ax, -120
test edi, edi
je .LBB7_3
cmp edi, 99
je .LBB7_3
lea eax, [2*rdi - 113]
.LBB7_3:
ret
| Global Rank | Capsule & Domain | Hardware _rdtsc | Latency | Throughput | ELF .text | Ternary Vote | Author Aye |
|---|---|---|---|---|---|---|---|
| #55 | rssi_from_raw (THIS CAPSULE) domain: smart-tree | id: 337de5b014f5b233224ef0318439e719 | 160353/40000 cyc/op | 381921/200000 ns/op | 200000000/381921 ops/us | 21 B .text (7 insns) | + (1) | aye::Hue+Gemini(0+1)::x86_64 @ 432Hz |