<div dir="ltr">Hi everyone,<div><br></div><div>I'm back with the same issue as before: flac encoding on an M1 Max Macbook pro is much slower on an arm build of 1.4.0 than it is running through emulation on an x86_64 build.</div><div><br></div><div>./configure -enable-static -disable-shared CFLAGS=" -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=10.9" CXXFLAGS="-arch arm64" LDFLAGS="-arch arm64" <br></div><div><br></div><div>gives:</div><div><br></div><div> Configuration summary :<br><br> FLAC version : ............................ 1.4.0<br><br> Host CPU : ................................ aarch64<br> Host Vendor : ............................. apple<br> Host OS : ................................. darwin21.6.0<br><br><br> Compiler is GCC : ......................... no<br> Compiler is Clang : ....................... yes<br> SSE optimizations : ....................... yes<br> Neon optimizations : ...................... yes<br> Asm optimizations : ....................... yes<br> Ogg/FLAC support : ........................ no<br> Stack protector : ........................ no<br> Fuzzing support (Clang only) : ............ no<br></div><div><br></div><div>Encoding flac level 8 for 1 file with 1.4.0 for x86_64 takes: 7.38 seconds</div><div>The same file with the arm build from the settings above: 41.71 seconds</div><div><br></div><div>This file is a 24 bit, 96khz wav file.</div><div><br></div><div>Any idea what's causing this?</div><div><br></div><div>Thanks,</div><div>Scott</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jul 10, 2022 at 5:01 PM Scott Brown <<a href="mailto:scottcbrown@gmail.com">scottcbrown@gmail.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"><div dir="ltr"><div>Thank you very much, Robert. Setting the CXXFLAGS and LDFLAGS did indeed solve my compilation issue.</div><div><br></div><div>The resulting build now encodes this same fileset at level 8 in 1:46. </div><div><br></div><div>so now we have:</div><div><br></div><div>current code in git, intel build running through emulation for this fileset I was testing on (encode 23 24/96 files at level 8): 3:02</div><div>arm build from git, no Neon optimizations: 3:54</div><div>arm build from git, with neon optimizations: 1:46</div><div><br></div><div>This is definitely an improvement. Thank you to all that helped</div><div><br></div><div>Scott</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jul 9, 2022 at 8:00 AM <<a href="mailto:flac-dev-request@xiph.org" target="_blank">flac-dev-request@xiph.org</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">Send flac-dev mailing list submissions to<br>
<a href="mailto:flac-dev@xiph.org" target="_blank">flac-dev@xiph.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="http://lists.xiph.org/mailman/listinfo/flac-dev" rel="noreferrer" target="_blank">http://lists.xiph.org/mailman/listinfo/flac-dev</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:flac-dev-request@xiph.org" target="_blank">flac-dev-request@xiph.org</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:flac-dev-owner@xiph.org" target="_blank">flac-dev-owner@xiph.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of flac-dev digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Re: slow on apple silicon? (Robert Kausch)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Fri, 8 Jul 2022 14:16:33 +0200<br>
From: Robert Kausch <<a href="mailto:robert.kausch@freac.org" target="_blank">robert.kausch@freac.org</a>><br>
To: <a href="mailto:flac-dev@xiph.org" target="_blank">flac-dev@xiph.org</a><br>
Subject: Re: [flac-dev] slow on apple silicon?<br>
Message-ID: <<a href="mailto:b97549ba-844d-cc21-752b-5889e35819bd@freac.org" target="_blank">b97549ba-844d-cc21-752b-5889e35819bd@freac.org</a>><br>
Content-Type: text/plain; charset=UTF-8; format=flowed<br>
<br>
Am 08.07.2022 um 09:26 schrieb Martijn van Beurden:<br>
> Op wo 6 jul. 2022 om 22:09 schreef Scott Brown <<a href="mailto:scottcbrown@gmail.com" target="_blank">scottcbrown@gmail.com</a>>:<br>
><br>
> Same list of cputype errors<br>
><br>
><br>
> It doesn't seem to be obvious where the problem lies, and I do not <br>
> have access to ARM-powered Mac hardware (nor any Mac hardware for that <br>
> matter) so I am unable to debug this. Anyone else?<br>
Just tried to create an aarch64 Mac build and succeeded with the current <br>
master.<br>
<br>
@Scott Brown, I think the build issue you have is due to not setting <br>
CXXFLAGS="-arch arm64" in addition to your CFLAGS and LDFLAGS. Because <br>
of that, the C++ sources are built for x86-64 and then cannot link to <br>
the aarch64 FLAC library.<br>
<br>
I also had to configure with "--host=aarch64-apple-darwin", but if you <br>
are building on an Apple Silicon Mac that should not be necessary.<br>
<br>
----<br>
Robert Kausch<br>
<a href="mailto:robert.kausch@freac.org" target="_blank">robert.kausch@freac.org</a><br>
<br>
<br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
flac-dev mailing list<br>
<a href="mailto:flac-dev@xiph.org" target="_blank">flac-dev@xiph.org</a><br>
<a href="http://lists.xiph.org/mailman/listinfo/flac-dev" rel="noreferrer" target="_blank">http://lists.xiph.org/mailman/listinfo/flac-dev</a><br>
<br>
<br>
------------------------------<br>
<br>
End of flac-dev Digest, Vol 191, Issue 7<br>
****************************************<br><br>
</blockquote></div></div>
</blockquote></div>