[flac-dev] flac-dev Digest, Vol 191, Issue 7

Scott Brown scottcbrown at gmail.com
Mon Sep 19 20:15:20 UTC 2022


Hi everyone,

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.

./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"

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 seconds
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 <scottcbrown at gmail.com> 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 <flac-dev-request at xiph.org> wrote:
>
>> Send flac-dev mailing list submissions to
>>         flac-dev at xiph.org
>>
>> 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
>>         flac-dev-request at xiph.org
>>
>> You can reach the person managing the list at
>>         flac-dev-owner at xiph.org
>>
>> 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 <robert.kausch at freac.org>
>> To: flac-dev at xiph.org
>> Subject: Re: [flac-dev] slow on apple silicon?
>> Message-ID: <b97549ba-844d-cc21-752b-5889e35819bd at freac.org>
>> Content-Type: text/plain; charset=UTF-8; format=flowed
>>
>> Am 08.07.2022 um 09:26 schrieb Martijn van Beurden:
>> > Op wo 6 jul. 2022 om 22:09 schreef Scott Brown <scottcbrown at gmail.com>:
>> >
>> >     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 that
>> > matter) so I am unable to debug this. Anyone else?
>> Just tried to create an aarch64 Mac build and succeeded with the current
>> master.
>>
>> @Scott Brown, I think the build issue you have is due to not setting
>> CXXFLAGS="-arch arm64" in addition to your CFLAGS and LDFLAGS. Because
>> 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=aarch64-apple-darwin", but if you
>> are building on an Apple Silicon Mac that should not be necessary.
>>
>> ----
>> Robert Kausch
>> robert.kausch at freac.org
>>
>>
>>
>> ------------------------------
>>
>> Subject: Digest Footer
>>
>> _______________________________________________
>> flac-dev mailing list
>> flac-dev at xiph.org
>> http://lists.xiph.org/mailman/listinfo/flac-dev
>>
>>
>> ------------------------------
>>
>> End of flac-dev Digest, Vol 191, Issue 7
>> ****************************************
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xiph.org/pipermail/flac-dev/attachments/20220919/4901ffb9/attachment.htm>


More information about the flac-dev mailing list