• GNAT Speed Comparison on Older Intel versus Apple Silicon M1

    From Jerry@21:1/5 to All on Tue Nov 8 20:07:32 2022
    I use GNAT on a late 2008 MacBook Pro with a 2.4 GHz Intel Core 2 Duo for heavy numerical computing. It is not uncommon for my programs to run several minutes to several hours. Does anyone have a feel for how much speed increase I would see using GNAT on
    an Apple Silicon M1 PowerBook Pro? My main curiosity is single-core runs since GNAT does not parallelize; I am aware that I can run multiple programs simultaneously on multiple cores.

    Jerry

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Fernando Oleo Blanco@21:1/5 to All on Wed Nov 9 08:38:48 2022
    Hi Jerry,

    taking the results from Geekbench: [1] for your current MacBook and [2]
    for the M1 MacBook from 2021; the results show that single core
    performance of the M1 MacBook Pro is about 6.4 times faster.

    However, notice that it is running on Aarch64 natively for the M1.
    Nonetheless, you can run x86 programs with little performance hit thanks
    to Apple Rosseta.

    Also, GNAT afaik, allows for parallel computations using tasks. The
    multicore performance gain between the two models is about 24x.

    There results are however just an average. Maybe your program does not
    see such improvements as it may bottleneck earlier or it may see greater
    gains.

    Regards,

    [1] https://browser.geekbench.com/macs/macbook-pro-early-2008
    [2] https://browser.geekbench.com/v5/cpu/18518008

    --
    Fernando Oleo Blanco
    https://irvise.xyz

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stephen Leake@21:1/5 to Jerry on Wed Nov 9 05:50:58 2022
    Jerry <list_email@icloud.com> writes:

    I use GNAT on a late 2008 MacBook Pro with a 2.4 GHz Intel Core 2 Duo
    for heavy numerical computing. It is not uncommon for my programs to
    run several minutes to several hours. Does anyone have a feel for how
    much speed increase I would see using GNAT on an Apple Silicon M1
    PowerBook Pro? My main curiosity is single-core runs since GNAT does
    not parallelize; I am aware that I can run multiple programs
    simultaneously on multiple cores.

    The recent standard Ada 2022 has more support for fine-grain
    parallelization, but it still requires adding syntax to the code.

    --
    -- Stephe

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jerry@21:1/5 to Fernando Oleo Blanco on Wed Nov 9 22:26:18 2022
    On Wednesday, November 9, 2022 at 12:38:51 AM UTC-7, Fernando Oleo Blanco wrote:
    Hi Jerry,

    taking the results from Geekbench: [1] for your current MacBook and [2]
    for the M1 MacBook from 2021; the results show that single core
    performance of the M1 MacBook Pro is about 6.4 times faster.

    That's a great site. Thanks. Clicking around a bit I was able to find separate comparisons for single-core floating point and the speed-up is 5.2.

    However, notice that it is running on Aarch64 natively for the M1.

    GNAT compiles to Aarch64 now, right?

    Nonetheless, you can run x86 programs with little performance hit thanks
    to Apple Rosseta.

    "little performance hit" compared to Intel code running on Rosseta versus Intel silicon or compared to native ARM? And I wonder how long until Apple takes away Rosseta this time? Last time it was two OS updates and then, poof, gone.

    Also, GNAT afaik, allows for parallel computations using tasks. The
    multicore performance gain between the two models is about 24x.

    There results are however just an average. Maybe your program does not
    see such improvements as it may bottleneck earlier or it may see greater gains.

    Regards,

    [1] https://browser.geekbench.com/macs/macbook-pro-early-2008
    [2] https://browser.geekbench.com/v5/cpu/18518008

    --
    Fernando Oleo Blanco
    https://irvise.xyz

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Wright@21:1/5 to Jerry on Sun Nov 13 16:29:54 2022
    Jerry <list_email@icloud.com> writes:

    GNAT compiles to Aarch64 now, right?

    You can download an aarch64-apple-darwin21 compiler for C, C++, Ada at
    [1]. However, it won't compiler C (or, I guess, C++) on Ventura - I'm
    working on a GCC 12.2 version.

    [1] https://github.com/simonjwright/distributing-gcc/releases/tag/gcc-12.1.0-aarch64-1

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)