Re: flac-dev Digest, Vol 191, Issue 7

Scott Brown <[email protected]> Mon, 27 Feb 2023 14:41:38 -0500
Newsgroups gmane.comp.audio.compression.flac.devel
Message-ID <CANJq19JL5ug-w1fr1iwrciTGYoc0Fy-JSxqeMaBuSJU0mmj9eA@mail.gmail.com>
--===============5561534536499080932==
Content-Type: multipart/alternative; boundary="000000000000d957b705f5b3abc8"

--000000000000d957b705f5b3abc8
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hello again,

Quick question about 1.4.2 source. When I comopiled the latest source back
in September, I got the " Neon optimizations : ...................... yes"
output. When I compile the official 1.4.2 source, there's nothing about
Neon. Has this just been removed from the output, or is the official 1.4.2
missing something?

Thanks,
Scott

On Mon, Sep 19, 2022 at 4:15=E2=80=AFPM Scott Brown <[email protected]>=
 wrote:

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

--000000000000d957b705f5b3abc8
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:arial,sans-serif">Hello again,</div><div class=3D"gmail_default" s=
tyle=3D"font-family:arial,sans-serif"><br></div><div class=3D"gmail_default=
" style=3D"font-family:arial,sans-serif">Quick question about 1.4.2 source.=
 When I comopiled the latest source back in September, I got the &quot;<spa=
n class=3D"gmail-Apple-converted-space" style=3D"font-family:Arial,Helvetic=
a,sans-serif">=C2=A0</span><span style=3D"font-family:Arial,Helvetica,sans-=
serif">Neon optimizations : ...................... yes&quot; output. When I=
 compile the official 1.4.2 source, there&#39;s nothing about Neon. Has thi=
s just been removed from the output, or is the official 1.4.2 missing somet=
hing?</span></div><div class=3D"gmail_default" style=3D"font-family:arial,s=
ans-serif"><span style=3D"font-family:Arial,Helvetica,sans-serif"><br></spa=
n></div><div class=3D"gmail_default" style=3D"font-family:arial,sans-serif"=
><span style=3D"font-family:Arial,Helvetica,sans-serif">Thanks,</span></div=
><div class=3D"gmail_default" style=3D"font-family:arial,sans-serif"><span =
style=3D"font-family:Arial,Helvetica,sans-serif">Scott</span></div></div><b=
r><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Mon, =
Sep 19, 2022 at 4:15=E2=80=AFPM Scott Brown &lt;<a href=3D"mailto:scottcbro=
[email protected]">[email protected]</a>&gt; wrote:<br></div><blockquote cla=
ss=3D"gmail_quote" style=3D"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=3D"ltr">Hi everyone,<div><br></div><div>I&#39;m back with the sa=
me issue as before: flac encoding on an M1 Max Macbook pro is much slower o=
n an arm build of 1.4.0 than it is running through emulation on an x86_64 b=
uild.</div><div><br></div><div>./configure -enable-static -disable-shared C=
FLAGS=3D&quot; -arch arm64 -isysroot /Applications/Xcode.app/Contents/Devel=
oper/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-m=
in=3D10.9&quot; CXXFLAGS=3D&quot;-arch arm64&quot; LDFLAGS=3D&quot;-arch ar=
m64&quot;=C2=A0<br></div><div><br></div><div>gives:</div><div><br></div><di=
v>=C2=A0Configuration summary :<br><br>=C2=A0 =C2=A0 FLAC version : .......=
..................... 1.4.0<br><br>=C2=A0 =C2=A0 Host CPU : ...............=
................. aarch64<br>=C2=A0 =C2=A0 Host Vendor : ..................=
........... apple<br>=C2=A0 =C2=A0 Host OS : ..............................=
... darwin21.6.0<br><br><br>=C2=A0 =C2=A0 Compiler is GCC : ...............=
.......... no<br>=C2=A0 =C2=A0 Compiler is Clang : ....................... =
yes<br>=C2=A0 =C2=A0 SSE optimizations : ....................... yes<br>=C2=
=A0 =C2=A0 Neon optimizations : ...................... yes<br>=C2=A0 =C2=A0=
 Asm optimizations : ....................... yes<br>=C2=A0 =C2=A0 Ogg/FLAC =
support : ........................ no<br>=C2=A0 =C2=A0 Stack protector =C2=
=A0: ........................ no<br>=C2=A0 =C2=A0 Fuzzing support (Clang on=
ly) : ............ no<br></div><div><br></div><div>Encoding flac level 8 fo=
r 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></d=
iv><div>This file is a 24 bit, 96khz wav file.</div><div><br></div><div>Any=
 idea what&#39;s causing this?</div><div><br></div><div>Thanks,</div><div>S=
cott</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gm=
ail_attr">On Sun, Jul 10, 2022 at 5:01 PM Scott Brown &lt;<a href=3D"mailto=
:[email protected]" target=3D"_blank">[email protected]</a>&gt; wro=
te:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px =
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(2=
04,204,204);padding-left:1ex"><div dir=3D"ltr"><div>Thank you very much, Ro=
bert. Setting the=C2=A0CXXFLAGS 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.=C2=A0</div><div><br></div><div>so now we have:<=
/div><div><br></div><div>current code in git, intel build running through e=
mulation 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><di=
v>arm build from git, with neon optimizations: 1:46</div><div><br></div><di=
v>This is definitely=C2=A0an improvement. Thank you to all that helped</div=
><div><br></div><div>Scott</div><br><div class=3D"gmail_quote"><div dir=3D"=
ltr" class=3D"gmail_attr">On Sat, Jul 9, 2022 at 8:00 AM &lt;<a href=3D"mai=
lto:[email protected]" target=3D"_blank">[email protected]<=
/a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0=
px 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 submiss=
ions to<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 <a href=3D"mailto:[email protected]" target=3D"=
_blank">[email protected]</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 <a href=3D"http://lists.xiph.org/mailman/listin=
fo/flac-dev" rel=3D"noreferrer" target=3D"_blank">http://lists.xiph.org/mai=
lman/listinfo/flac-dev</a><br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 <a href=3D"mailto:[email protected]" ta=
rget=3D"_blank">[email protected]</a><br>
<br>
You can reach the person managing the list at<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 <a href=3D"mailto:[email protected]" targ=
et=3D"_blank">[email protected]</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of flac-dev digest...&quot;<br>
<br>
<br>
Today&#39;s Topics:<br>
<br>
=C2=A0 =C2=A01. 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 &lt;<a href=3D"mailto:[email protected]" target=
=3D"_blank">[email protected]</a>&gt;<br>
To: <a href=3D"mailto:[email protected]" target=3D"_blank">[email protected]=
g</a><br>
Subject: Re: [flac-dev] slow on apple silicon?<br>
Message-ID: &lt;<a href=3D"mailto:b97549ba-844d-cc21-752b-5889e35819bd@frea=
c.org" target=3D"_blank">[email protected]</a>=
&gt;<br>
Content-Type: text/plain; charset=3DUTF-8; format=3Dflowed<br>
<br>
Am 08.07.2022 um 09:26 schrieb Martijn van Beurden:<br>
&gt; Op wo 6 jul. 2022 om 22:09 schreef Scott Brown &lt;<a href=3D"mailto:s=
[email protected]" target=3D"_blank">[email protected]</a>&gt;:<br>
&gt;<br>
&gt;=C2=A0 =C2=A0 =C2=A0Same list of cputype errors<br>
&gt;<br>
&gt;<br>
&gt; It doesn&#39;t seem to be obvious where the problem lies, and I do not=
 <br>
&gt; have access to ARM-powered Mac hardware (nor any Mac hardware for that=
 <br>
&gt; matter) so I am unable to debug this. Anyone else?<br>
Just tried to create an aarch64 Mac build and succeeded with the current <b=
r>
master.<br>
<br>
@Scott Brown, I think the build issue you have is due to not setting <br>
CXXFLAGS=3D&quot;-arch arm64&quot; 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 &quot;--host=3Daarch64-apple-darwin&quot;, but=
 if you <br>
are building on an Apple Silicon Mac that should not be necessary.<br>
<br>
----<br>
Robert Kausch<br>
<a href=3D"mailto:[email protected]" target=3D"_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=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a=
><br>
<a href=3D"http://lists.xiph.org/mailman/listinfo/flac-dev" rel=3D"noreferr=
er" target=3D"_blank">http://lists.xiph.org/mailman/listinfo/flac-dev</a><b=
r>
<br>
<br>
------------------------------<br>
<br>
End of flac-dev Digest, Vol 191, Issue 7<br>
****************************************<br><br>
</blockquote></div></div>
</blockquote></div>
</blockquote></div></div>

--000000000000d957b705f5b3abc8--

--===============5561534536499080932==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
flac-dev mailing list
[email protected]
http://lists.xiph.org/mailman/listinfo/flac-dev

--===============5561534536499080932==--