M1pro performance

Hi guys, just ejected myself into the now and got me a nice and big M1pro fruit bowl (10-core, 32GB ram, 16"). Of course the first thing I did is check how many sine waves it can play. Using the code below I could get 20,000 sine waves playing simultaneously without hickups (95% cpu), on a vanilla SC 3.12.1 install using scsynth. On my previous machine (a 2012 intel mbpro) the same test only gets me only half of that amount. Serious progress, and it’s still running on Rosetta (does anyone have a native M1 build around?). I wonder how this score compares to more current intel machines though, anyone care to try?

s.options.memSize = 2**16;
s.options.numWireBufs = 1024;
s.boot;

(
SynthDef( “1000sines”, {
Out.ar( 0, SinOsc.ar( Rand(220.dup(1000), 440 ), 0, 1/5000 ).sum.dup )
}).load;
)

Synth( “1000sines” ); // repeat 20 x = 95%cpu

ps: Monterey seems perfectly ok with the current SC version and build.

3 Likes

Rosetta 2 is really good, and I think you were getting close to native performance (since this version of Rosetta actually converts the binary TO the architecture you are on).
I was able to repeat 24 times when I started to get some clicks… same machine as yours I think and a native build!

1 Like

Here are some comparisons with my Windows Intel laptops:

i3-4100M @2.5 GHz with 2 cores (4 hardware threads)

scsynth official binaries: ca. 5x
scsynth native build (AVX2): ca. 8x


i7-9700 @3 GHz with 8 cores

scsynth official binaries: ca. 11x
scsynth native build (AVX2): ca. 18x
supernova native build (with ParGroup and 8 audio threads): ca. 50x


NOTE: by default, Supercollider Intel binaries are only built for SSE2 to make them compatible with older systems. Most modern Intel processors, however, support AVX2. The register size of AVX (256 bits) is twice as large than SSE (128 bits), so AVX can produce much faster code, as is demonstrated in my benchmarks.


Anyway, single core performance of the M1 is truely impressive!! How far do you get with Supernova?

2 Likes

Hi Josh, that’s even better. By native build you mean an arm version? Does that run well too, or are there problems? I’ll try to make my own build as well, but perhaps it would be nice to have an arm version in the official downloads too…

Meanwhile I’m experiencing issues with the vanilla build and supernova in synthdef loading; it’s really slow (as in minutes) at loading an scsyndef file from disk. Also soundfiles loading in scsynth goes much slower, especially as expectations are high with the ultrafast ssd and all. Could rosetta cause this?

Yes - native built for ARM.
I’m working on a script to better handle signing. Signing is required for even roll your own ARM builds so we need to update how that is handled with cmake (even if you don’t plan to distribute). We should have “official” builds hopefully soon.

/*
Josh Parmenter
www.realizedsound.net/josh
*/

I’ve had issues with for example the \default synthdef never getting built and having to execute Event.makeDefaultSynthDef after boot I wonder if this has the same cause