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 (1/1 cyc/op); safe for ultra-hot per-sample or per-packet inner loops.
Snap-Circuit Wiring Role: Specialized Multi-Pin Stage `(i64,i64,i64)->i64` — wire matching input pins via `snap_dag` or `snap_pipeline`.
.text: 91 B (27 x86_64 insns)337 B)pub fn zeno_pid_speculative_depth_step(ewma_num: i64, ewma_den: i64, current_k: i64) -> i64 { let safe_den = if ewma_den <= 0 { 100 } else { ewma_den }; let err_scaled = ewma_num * 100 - 65 * safe_den; let delta = (err_scaled * 3) / safe_den; let next_k = current_k + delta; if next_k < 1 { 1 } else if next_k > 8 { 8 } else { next_k } }
rustc -C opt-level=3 x86_64 Disassembly (91 B .text / 27 insns)zeno_pid_speculative_depth_step:
mov rcx, rdx
test rsi, rsi
mov r8d, 100
cmovg r8, rsi
imul rax, rdi, 100
mov rdx, r8
shl rdx, 6
add rdx, r8
sub rax, rdx
lea rax, [rax + 2*rax]
mov rdx, rax
or rdx, r8
shr rdx, 32
je .LBB7_1
cqo
idiv r8
jmp .LBB7_3
.LBB7_1:
xor edx, edx
div r8d
.LBB7_3:
add rax, rcx
cmp rax, 2
mov ecx, 1
cmovge rcx, rax
cmp rcx, 8
mov eax, 8
cmovl rax, rcx
ret
| Global Rank | Capsule & Domain | Hardware _rdtsc | Latency | Throughput | ELF .text | Ternary Vote | Author Aye |
|---|---|---|---|---|---|---|---|
| #1692 | zeno_pid_speculative_depth_step (THIS CAPSULE) domain: smart-tree | id: 6800dd3c3403e335ee4c097761b03527 | 1/1 cyc/op | 5247479/400000 ns/op | 400000000/5247479 ops/us | 91 B .text (27 insns) | + (1) | aye::Hue+Omni(0+1)::aarch64 @ 432Hz |