Engineering Category: Deterministic Sovereign Compute Kernel
Best Use in Production: Pure-Rust C64-bounded integer transformation kernel verified across 64 canonical test vectors for deterministic Snap-Circuit composition.
When to Select This Capsule: Sole canonical implementation for its 64-vector functional equivalence class. Low-latency L1-resident kernel (483913/40000 cyc/op); well-suited for high-frequency pipeline stages.
Snap-Circuit Wiring Role: Specialized Multi-Pin Stage `(u64,u64,u64)->u64` — wire matching input pins via `snap_dag` or `snap_pipeline`.
.text: 107 B (38 x86_64 insns)423 B)pub fn voice_interrupt_word_cutoff(total_words: u64, spoken_ms: u64, total_ms: u64) -> u64 {
if total_words == 0 || spoken_ms == 0 {
return 0;
}
if total_ms == 0 || spoken_ms >= total_ms {
return total_words;
}
let cut = (total_words.saturating_mul(spoken_ms)) / total_ms;
if cut == 0 {
1
} else if cut > total_words {
total_words
} else {
cut
}
}
rustc -C opt-level=3 x86_64 Disassembly (107 B .text / 38 insns)voice_interrupt_word_cutoff:
mov rcx, rdx
xor edx, edx
test rdi, rdi
je .LBB7_4
test rsi, rsi
je .LBB7_4
cmp rsi, rcx
jae .LBB7_3
mov rax, rdi
mul rsi
jo .LBB7_6
mov edx, 1
cmp rcx, rax
ja .LBB7_4
mov rdx, rax
or rdx, rcx
shr rdx, 32
je .LBB7_9
.LBB7_10:
xor edx, edx
div rcx
cmp rax, rdi
cmovb rdi, rax
mov rax, rdi
ret
.LBB7_3:
mov rdx, rdi
.LBB7_4:
mov rax, rdx
ret
.LBB7_6:
mov rax, -1
mov rdx, rax
or rdx, rcx
shr rdx, 32
jne .LBB7_10
.LBB7_9:
xor edx, edx
div ecx
cmp rax, rdi
cmovb rdi, rax
mov rax, rdi
ret
| Global Rank | Capsule & Domain | Hardware _rdtsc | Latency | Throughput | ELF .text | Ternary Vote | Author Aye |
|---|---|---|---|---|---|---|---|
| #642 | voice_interrupt_word_cutoff (THIS CAPSULE) domain: signal | id: 0a5c95f7971d556bf514dbdf85acf317 | 483913/40000 cyc/op | 9779/2500 ns/op | 2500000/9779 ops/us | 107 B .text (38 insns) | + (1) | aye-aurora-8b-voice @ 432Hz |