Benchmarks — 2026-11-24
Configuration
| Machine | MacBook Pro, Apple M5 Max, 18 cores, 48 GB |
| System | macOS 27.0 (26A5425a) |
| Toolchain | Rust 1.95.0, --release (opt-level 3, thin LTO), Xcode 27.2 |
| Engine | 48 kHz, stereo, single audio thread, internal chunks of at most 64 frames |
| 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 |
| Statistics | percentiles are upper bounds of 5 µs histogram buckets; a callback "misses" when it takes longer than the audio it produces |
Other work was running on the machine (builds by other processes), so these are conservative. They are measurements of this machine on this day, not guarantees. Reproduce with:
cargo run --release -p sonata-cli -- benchmark --seconds 5
cargo run --release -p sonata-render --example engine_bench 5
SONATA_DEVICE_TEST=1 swift test --filter realDevice # in Packages/SonataBridge Voices through the compiler (sonata benchmark)
Each case is a Sonata program compiled by the real compiler: N voices of one standard instrument holding whole notes. "voices" is the measured peak of sounding voices, release tails included (a track is capped at 72 voices by this benchmark's limits, so "x64" and above steal voices on one track).
build: release — 5 s per case, 48 kHz, single thread, offline clock (no audio device)
case block budget mean p50 p99 max load99 missed voices
SynthLead x1 128 2667us 4.6us 5.0us 10.0us 10.2us 0.4%02
SynthLead x1 256 5333us 9.1us 10.0us 15.0us 24.0us 0.3%02
SynthLead x8 128 2667us 25.6us 25.0us 50.0us 60.6us 1.9%016
SynthLead x8 256 5333us 51.6us 50.0us 95.0us 107.7us 1.8%016
SynthLead x16 128 2667us 49.8us 45.0us 90.0us 99.9us 3.4%032
SynthLead x16 256 5333us 99.1us 90.0us 180.0us 182.8us 3.4%032
SynthLead x32 128 2667us 98.1us 90.0us 180.0us 184.2us 6.8%064
SynthLead x32 256 5333us 195.3us 175.0us 350.0us 358.4us 6.6%064
SynthLead x64 128 2667us 174.7us 175.0us 200.0us 242.4us 7.5%072
SynthLead x64 256 5333us 349.2us 345.0us 395.0us 471.7us 7.4%072
SynthLead x128 128 2667us 344.4us 345.0us 370.0us 464.7us 13.9%0136
SynthLead x128 256 5333us 689.0us 685.0us 740.0us 925.8us 13.9%0136
SynthLead x256 128 2667us 685.1us 685.0us 715.0us 992.9us 26.8%0264
SynthLead x256 256 5333us 1370.3us 1365.0us 1435.0us 1871.7us 26.9%0264
GrandPiano x1 128 2667us 6.9us 10.0us 10.0us 19.7us 0.4%02
GrandPiano x1 256 5333us 13.7us 15.0us 20.0us 31.1us 0.4%02
GrandPiano x8 128 2667us 28.6us 30.0us 55.0us 58.7us 2.1%016
GrandPiano x8 256 5333us 56.8us 55.0us 105.0us 114.2us 2.0%016
GrandPiano x16 128 2667us 53.2us 50.0us 100.0us 110.7us 3.8%032
GrandPiano x16 256 5333us 106.3us 100.0us 200.0us 210.2us 3.8%032
GrandPiano x32 128 2667us 102.5us 100.0us 195.0us 217.9us 7.3%064
GrandPiano x32 256 5333us 207.6us 195.0us 390.0us 524.7us 7.3%064
GrandPiano x64 128 2667us 191.7us 190.0us 265.0us 337.5us 9.9%072
GrandPiano x64 256 5333us 385.7us 380.0us 540.0us 613.4us 10.1%072
percentiles are upper bounds of 5 us buckets; load99 = p99 / buffer duration
machine: Apple M5 Max, 18 cores, 48 GB, macOS 27.0
build: release — 4 s per case, 48 kHz, single thread, offline clock (no audio device)
case block budget mean p50 p99 max load99 missed voices
aurora.sonata 128 2667us 18.7us 25.0us 35.0us 36.8us 1.3%07
aurora.sonata 256 5333us 37.8us 45.0us 64.3us 64.3us 1.2%07
percentiles are upper bounds of 5 us buckets; load99 = p99 / buffer duration Engine ladder (engine_bench)
Programs built directly on the engine, one track per 64 voices, so the voice counts are real up to 1024.
ORIX Sonata engine benchmark: 48000 Hz, 5 s per row after 1 s warm-up, single thread, build: release
load = processing time / audio time; a callback misses its deadline when it takes longer than its block.
configuration voices* block x realtime load % p50 us p95 us p99 us p99.9 us max us missed
synth x1 2 128 782.4 0.13 5 5 8 8 8 0
synth x1 2 256 797.9 0.13 10 10 10 22 22 0
synth x16 32 128 86.4 1.16 25 55 55 70 86 0
synth x16 32 256 84.1 1.19 55 105 105 112 112 0
synth x64 64 128 28.1 3.56 100 105 110 124 124 0
synth x64 64 256 27.8 3.60 200 210 215 258 258 0
synth x256 256 128 7.2 13.92 390 410 420 485 494 0
synth x256 256 256 7.2 13.83 780 820 830 949 949 0
synth x1024 1024 128 1.8 55.22 1545 1630 1670 1945 1971 0
synth x1024 1024 256 1.8 55.03 3060 3250 3300 3837 3837 0
piano x1 2 128 360.9 0.28 10 10 10 20 21 0
piano x1 2 256 364.8 0.27 15 20 20 26 26 0
piano x16 32 128 51.5 1.94 45 85 90 97 97 0
piano x16 32 256 51.8 1.93 90 170 175 240 240 0
piano x64 64 128 16.6 6.02 160 170 170 227 227 0
piano x64 64 256 16.6 6.04 320 340 355 427 427 0
piano x256 256 128 4.3 23.18 615 645 660 875 879 0
piano x256 256 256 4.3 23.16 1225 1290 1310 1633 1633 0
piano x1024 1024 128 1.1 92.96 2460 2585 2620 3510 3616 10
piano x1024 1024 256 1.0 102.36 5325 7040 7975 8791 8791 456
plucked_string x1 2 128 633.6 0.16 5 10 10 15 55 0
plucked_string x1 2 256 666.0 0.15 10 10 15 43 43 0
plucked_string x16 32 128 111.0 0.90 25 40 45 95 177 0
plucked_string x16 32 256 112.2 0.89 45 80 85 170 170 0
plucked_string x64 64 128 35.9 2.78 75 80 100 135 135 0
plucked_string x64 64 256 35.8 2.79 145 165 210 364 364 0
plucked_string x256 256 128 8.2 12.22 325 350 450 565 645 0
plucked_string x256 256 256 7.7 12.98 660 910 1170 1585 1585 0
plucked_string x1024 1024 128 1.8 56.42 1430 1885 2155 2550 2646 0
plucked_string x1024 1024 256 1.8 54.19 2825 3515 4010 4311 4311 0
synth x16 + eq, comp, reverb 32 128 59.7 1.68 40 70 70 165 187 0
synth x16 + eq, comp, reverb 32 256 58.8 1.70 80 140 160 367 367 0
synth x64 + eq, comp, reverb 64 128 22.2 4.51 125 135 160 320 323 0
synth x64 + eq, comp, reverb 64 256 22.5 4.45 240 270 295 423 423 0
synth x256 + eq, comp, reverb 256 128 5.6 17.70 470 640 800 975 1012 0
synth x256 + eq, comp, reverb 256 256 5.7 17.49 940 1130 1295 1487 1487 0
34 of 36 rows had no callback longer than its block (2666 us at 128 frames, 5333 us at 256).
Percentiles are upper bounds of 5 us histogram buckets; values above 10000 us are reported as the maximum.
* voices = largest number of simultaneously active voices observed (release tails included; 32 preallocated per track).
This measures the engine alone, driven in a loop on one core: no audio device, no UI, no other load.Reading the numbers
- 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.
- 256 voices: 14 % (synth) to 23 % (piano) of one core, no missed callback.
- 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.
- The engine is single-threaded; these figures do not use the other 17 cores.
- 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.
Real output device
realDeviceCallbackRunsMuted opens the default output device through AVAudioEngine with the
monitor fully muted (digital silence reaches the device) and plays a 2-second program:
| Build | Device rate | Callbacks | Mean | p99 | Max | Overruns | Transport after 2 s |
|---|---|---|---|---|---|---|---|
| debug library | 48 000 Hz | 188 | 314 µs | 530 µs | 536 µs | 0 | 2.016 s |
This is a debug build of the Rust library and a 2-second run: it shows the path works on a real device and that the transport follows the device clock, not what a release build costs.
Compile time
The starter template (2 tracks, 15 notes): lexer 118 µs, parser 146 µs, semantics 337 µs, graph 10 µs (debug build, from the Compiler space). The fuzz test compiles about 6 000 programs in 3 s.
Not measured
Round-trip latency (no loopback hardware), long runs (hours), underruns under memory pressure, 192 kHz in real time, graphics load of the Studio and WaveLab beyond the single 60 fps Metal waterfall figure (16.7 ms per frame, 0.11 ms encode time with one slice), battery impact.