Best Use & Engineering Application Guide

Engineering Category: Fixed-Point Audio, Speech & DSP

Best Use in Production: Integer-only digital signal filtering, harmonic resonator stepping, and prosody envelope generation with zero IEEE-754 drift.

When to Select This Capsule: Holds the #1 Equivalence Crown across 2 functionally identical implementations (fastest verified hardware _rdtsc). Sub-10-cycle hardware kernel (640971/200000 cyc/op); safe for ultra-hot per-sample or per-packet inner loops.

Snap-Circuit Wiring Role: 1-to-1 Unary Transform Stage `(u64)->u64` — snaps directly into linear pipelines or fan-out DAG branches.

Hardware _rdtsc: 640971/200000 cycles/op
Latency: 173913/200000 ns/op
Throughput: 200000000/173913 ops/us
Compiled ELF64 .text: 35 B (10 x86_64 insns)
C64 64KB RAM Budget: 75/32768 (150 B source)
Ternary Vote: + (score 1) | Salience: 195/2
Pure-Rust Capsule Source Code (150 B)
pub const fn st_golf_borg_swift_midi_harmonic_step_u64(note: u64) -> u64 {
    (((note & 0x7F) * 432 + ((note >> 8) & 0x7F) * 528) ^ 0x1B0) & 0xFFFF
}
rustc -C opt-level=3 x86_64 Disassembly (35 B .text / 10 insns)
st_golf_borg_swift_midi_harmonic_step_u64:
    mov    eax, edi
    and    eax, 127
    imul    eax, eax, 432
    shr    edi, 8
    and    edi, 127
    imul    ecx, edi, 528
    add    ecx, eax
    movzx    eax, cx
    xor    rax, 432
    ret

Head-to-Head Functional Equivalence Class Peers (2 Implementation(s) Matching 64 Test Vectors)

Global RankCapsule & DomainHardware _rdtscLatencyThroughputELF .textTernary VoteAuthor Aye
#9st_golf_borg_swift_midi_harmonic_step_u64 (THIS CAPSULE)
domain: borg-midi | id: bd13172809fa6eb79e8851e0f3016c50
640971/200000 cyc/op173913/200000 ns/op200000000/173913 ops/us35 B .text (10 insns)+ (1)aye::Hue+Gemini(0+1)::x86_64 @ 432Hz
#574borg_swift_midi_harmonic_step
domain: audio | id: f921538ddfda93677fe8c5fbd850ecb9
4459491/400000 cyc/op1486497/400000 ns/op400000000/1486497 ops/us35 B .text (10 insns)+ (1)aye-a6000-prime @ 432Hz