<div dir="ltr">Martijn filled me in that recent changes (since the official 1.3.4 source) have added ARM improvements, and that if I get the most recent code, I should be good.<div><br></div><div>(I can't get the most recent code to compile, but that's a different story I suppose)</div><div><br></div><div>Thanks,</div><div>Scott</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 5, 2022 at 2:44 PM brianw <<a href="mailto:brianw@audiobanshee.com">brianw@audiobanshee.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">You raise excellent questions. I have not been paying attention to Apple's compiler support for the M1, M1 Pro, and M1 Max.<br>
<br>
Do you have the latest compiler from Apple?<br>
<br>
Are you sure that -O3 is the best option? I seem to recall that the 'best' has changed over the years.<br>
<br>
I also recall that Apple support for SSE was slow to be delivered, at a time when AltiVec support was highly performant. Could it be possible that Apple's compiler doesn't support the M1 Max vector instructions as well as it support SSE? My experience may not be related to the compiler, though, because I was using the vecLib framework, part of the Accelerate framework. Initially, Apple provided routines for Intel that were functionally correct, but not optimized. Later, those routines were optimized, and programs linked against the framework automatically inherited the improvements. flac does not use these frameworks, so my example may not be relevant.<br>
<br>
For comparison, how long does your test set take when going through emulation?<br>
<br>
Brian<br>
<br>
<br>
On Jul 5, 2022, at 9:48 AM, Scott Brown wrote:<br>
> <br>
> Hi everyone,<br>
> <br>
> I've got a question regarding Apple Silicon chips and flac encoding. I'm not seeing the speed I think I should be seeing<br>
> <br>
> I compiled a universal flac 1.3.4 for Apple Silicon and 64 bit intel like so:<br>
> <br>
> ./configure -enable-static -disable-shared CFLAGS=" -arch arm64 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.9 -O3" ; make<br>
> <br>
> Encoding 24/96 wav files to flac level 8 for a fileset i've been testing takes about 3 minutes and 10 seconds on an M1 Max processor using the native arm build.<br>
> <br>
> Using the intel build on the M1 Max (which goes through Apple's Rosetta emulation) takes 1 minute and 50 seconds.<br>
> <br>
> I would expect the native Arm build to be much faster since it's not going through emulation. What am I missing? Some compilation flag?<br>
> <br>
> Thanks,<br>
> Scott<br>
<br>
</blockquote></div>