Repository Public
1<!--2ORIX Sonata3File: Benchmarks/2026-11-24-m5max.md4Author: Simon-Pierre Boucher5Contact: contact@spboucher.ai6-->7# Benchmarks — 2026-11-2489## Configuration1011| | |12|---|---|13| Machine | MacBook Pro, Apple M5 Max, 18 cores, 48 GB |14| System | macOS 27.0 (26A5425a) |15| Toolchain | Rust 1.95.0, `--release` (opt-level 3, thin LTO), Xcode 27.2 |16| Engine | 48 kHz, stereo, single audio thread, internal chunks of at most 64 frames |17| Clock | offline (no audio device) unless stated: the processor is called in a loop with blocks of the stated size and each call is timed |18| Statistics | percentiles are upper bounds of 5 µs histogram buckets; a callback "misses" when it takes longer than the audio it produces |1920Other work was running on the machine (builds by other processes), so these are conservative.21They are measurements of this machine on this day, not guarantees. Reproduce with:2223```bash24cargo run --release -p sonata-cli -- benchmark --seconds 525cargo run --release -p sonata-render --example engine_bench 526SONATA_DEVICE_TEST=1 swift test --filter realDevice # in Packages/SonataBridge27```2829## Voices through the compiler (`sonata benchmark`)3031Each case is a Sonata program compiled by the real compiler: N voices of one standard instrument32holding whole notes. "voices" is the measured peak of sounding voices, release tails included33(a track is capped at 72 voices by this benchmark's limits, so "x64" and above steal voices on one track).3435```36build: release — 5 s per case, 48 kHz, single thread, offline clock (no audio device)37case block budget mean p50 p99 max load99 missed voices38SynthLead x1 128 2667us 4.6us 5.0us 10.0us 10.2us 0.4%0239SynthLead x1 256 5333us 9.1us 10.0us 15.0us 24.0us 0.3%0240SynthLead x8 128 2667us 25.6us 25.0us 50.0us 60.6us 1.9%01641SynthLead x8 256 5333us 51.6us 50.0us 95.0us 107.7us 1.8%01642SynthLead x16 128 2667us 49.8us 45.0us 90.0us 99.9us 3.4%03243SynthLead x16 256 5333us 99.1us 90.0us 180.0us 182.8us 3.4%03244SynthLead x32 128 2667us 98.1us 90.0us 180.0us 184.2us 6.8%06445SynthLead x32 256 5333us 195.3us 175.0us 350.0us 358.4us 6.6%06446SynthLead x64 128 2667us 174.7us 175.0us 200.0us 242.4us 7.5%07247SynthLead x64 256 5333us 349.2us 345.0us 395.0us 471.7us 7.4%07248SynthLead x128 128 2667us 344.4us 345.0us 370.0us 464.7us 13.9%013649SynthLead x128 256 5333us 689.0us 685.0us 740.0us 925.8us 13.9%013650SynthLead x256 128 2667us 685.1us 685.0us 715.0us 992.9us 26.8%026451SynthLead x256 256 5333us 1370.3us 1365.0us 1435.0us 1871.7us 26.9%026452GrandPiano x1 128 2667us 6.9us 10.0us 10.0us 19.7us 0.4%0253GrandPiano x1 256 5333us 13.7us 15.0us 20.0us 31.1us 0.4%0254GrandPiano x8 128 2667us 28.6us 30.0us 55.0us 58.7us 2.1%01655GrandPiano x8 256 5333us 56.8us 55.0us 105.0us 114.2us 2.0%01656GrandPiano x16 128 2667us 53.2us 50.0us 100.0us 110.7us 3.8%03257GrandPiano x16 256 5333us 106.3us 100.0us 200.0us 210.2us 3.8%03258GrandPiano x32 128 2667us 102.5us 100.0us 195.0us 217.9us 7.3%06459GrandPiano x32 256 5333us 207.6us 195.0us 390.0us 524.7us 7.3%06460GrandPiano x64 128 2667us 191.7us 190.0us 265.0us 337.5us 9.9%07261GrandPiano x64 256 5333us 385.7us 380.0us 540.0us 613.4us 10.1%07262percentiles are upper bounds of 5 us buckets; load99 = p99 / buffer duration63machine: Apple M5 Max, 18 cores, 48 GB, macOS 27.064build: release — 4 s per case, 48 kHz, single thread, offline clock (no audio device)65case block budget mean p50 p99 max load99 missed voices66aurora.sonata 128 2667us 18.7us 25.0us 35.0us 36.8us 1.3%0767aurora.sonata 256 5333us 37.8us 45.0us 64.3us 64.3us 1.2%0768percentiles are upper bounds of 5 us buckets; load99 = p99 / buffer duration69```7071## Engine ladder (`engine_bench`)7273Programs built directly on the engine, one track per 64 voices, so the voice counts are real up to 1024.7475```76ORIX Sonata engine benchmark: 48000 Hz, 5 s per row after 1 s warm-up, single thread, build: release77load = processing time / audio time; a callback misses its deadline when it takes longer than its block.7879configuration voices* block x realtime load % p50 us p95 us p99 us p99.9 us max us missed80synth x1 2 128 782.4 0.13 5 5 8 8 8 081synth x1 2 256 797.9 0.13 10 10 10 22 22 082synth x16 32 128 86.4 1.16 25 55 55 70 86 083synth x16 32 256 84.1 1.19 55 105 105 112 112 084synth x64 64 128 28.1 3.56 100 105 110 124 124 085synth x64 64 256 27.8 3.60 200 210 215 258 258 086synth x256 256 128 7.2 13.92 390 410 420 485 494 087synth x256 256 256 7.2 13.83 780 820 830 949 949 088synth x1024 1024 128 1.8 55.22 1545 1630 1670 1945 1971 089synth x1024 1024 256 1.8 55.03 3060 3250 3300 3837 3837 090piano x1 2 128 360.9 0.28 10 10 10 20 21 091piano x1 2 256 364.8 0.27 15 20 20 26 26 092piano x16 32 128 51.5 1.94 45 85 90 97 97 093piano x16 32 256 51.8 1.93 90 170 175 240 240 094piano x64 64 128 16.6 6.02 160 170 170 227 227 095piano x64 64 256 16.6 6.04 320 340 355 427 427 096piano x256 256 128 4.3 23.18 615 645 660 875 879 097piano x256 256 256 4.3 23.16 1225 1290 1310 1633 1633 098piano x1024 1024 128 1.1 92.96 2460 2585 2620 3510 3616 1099piano x1024 1024 256 1.0 102.36 5325 7040 7975 8791 8791 456100plucked_string x1 2 128 633.6 0.16 5 10 10 15 55 0101plucked_string x1 2 256 666.0 0.15 10 10 15 43 43 0102plucked_string x16 32 128 111.0 0.90 25 40 45 95 177 0103plucked_string x16 32 256 112.2 0.89 45 80 85 170 170 0104plucked_string x64 64 128 35.9 2.78 75 80 100 135 135 0105plucked_string x64 64 256 35.8 2.79 145 165 210 364 364 0106plucked_string x256 256 128 8.2 12.22 325 350 450 565 645 0107plucked_string x256 256 256 7.7 12.98 660 910 1170 1585 1585 0108plucked_string x1024 1024 128 1.8 56.42 1430 1885 2155 2550 2646 0109plucked_string x1024 1024 256 1.8 54.19 2825 3515 4010 4311 4311 0110synth x16 + eq, comp, reverb 32 128 59.7 1.68 40 70 70 165 187 0111synth x16 + eq, comp, reverb 32 256 58.8 1.70 80 140 160 367 367 0112synth x64 + eq, comp, reverb 64 128 22.2 4.51 125 135 160 320 323 0113synth x64 + eq, comp, reverb 64 256 22.5 4.45 240 270 295 423 423 0114synth x256 + eq, comp, reverb 256 128 5.6 17.70 470 640 800 975 1012 0115synth x256 + eq, comp, reverb 256 256 5.7 17.49 940 1130 1295 1487 1487 011611734 of 36 rows had no callback longer than its block (2666 us at 128 frames, 5333 us at 256).118Percentiles are upper bounds of 5 us histogram buckets; values above 10000 us are reported as the maximum.119* voices = largest number of simultaneously active voices observed (release tails included; 32 preallocated per track).120This measures the engine alone, driven in a loop on one core: no audio device, no UI, no other load.121```122123## Reading the numbers124125- **64 voices** of the subtractive synth or of the modal piano take 4–6 % of one core at 128 frames, with p99 under 0.2 ms: the "64 voices in a light session" target of the mandate is met on this machine, with a large margin.126- **256 voices**: 14 % (synth) to 23 % (piano) of one core, no missed callback.127- **1024 simple voices** (synth, plucked string): about 55 % of one core at 128 frames, no missed callback in these runs. **1024 piano voices do not hold**: load reaches 93–102 % and callbacks are missed. 1024 orchestral voices are not claimed.128- The engine is single-threaded; these figures do not use the other 17 cores.129- **Offline rendering** runs the same processor: 16× to 780× real time in the table above depending on the load; the starter template renders at about 55× in a debug build.130131## Real output device132133`realDeviceCallbackRunsMuted` opens the default output device through AVAudioEngine with the134monitor fully muted (digital silence reaches the device) and plays a 2-second program:135136| Build | Device rate | Callbacks | Mean | p99 | Max | Overruns | Transport after 2 s |137|---|---|---|---|---|---|---|---|138| debug library | 48 000 Hz | 188 | 314 µs | 530 µs | 536 µs | 0 | 2.016 s |139140This is a debug build of the Rust library and a 2-second run: it shows the path works on a real141device and that the transport follows the device clock, not what a release build costs.142143## Compile time144145The starter template (2 tracks, 15 notes): lexer 118 µs, parser 146 µs, semantics 337 µs,146graph 10 µs (debug build, from the Compiler space). The fuzz test compiles about 6 000 programs in 3 s.147148## Not measured149150Round-trip latency (no loopback hardware), long runs (hours), underruns under memory pressure,151192 kHz in real time, graphics load of the Studio and WaveLab beyond the single 60 fps Metal152waterfall figure (16.7 ms per frame, 0.11 ms encode time with one slice), battery impact.153