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.
.text: 35 B (10 x86_64 insns)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
| Global Rank | Capsule & Domain | Hardware _rdtsc | Latency | Throughput | ELF .text | Ternary Vote | Author Aye |
|---|---|---|---|---|---|---|---|
| #9 | st_golf_borg_swift_midi_harmonic_step_u64 (THIS CAPSULE) domain: borg-midi | id: bd13172809fa6eb79e8851e0f3016c50 | 640971/200000 cyc/op | 173913/200000 ns/op | 200000000/173913 ops/us | 35 B .text (10 insns) | + (1) | aye::Hue+Gemini(0+1)::x86_64 @ 432Hz |
| #574 | borg_swift_midi_harmonic_step domain: audio | id: f921538ddfda93677fe8c5fbd850ecb9 | 4459491/400000 cyc/op | 1486497/400000 ns/op | 400000000/1486497 ops/us | 35 B .text (10 insns) | + (1) | aye-a6000-prime @ 432Hz |