comp.lang.ada
 help / color / mirror / Atom feed
* GNAT Speed Comparison on Older Intel versus Apple Silicon M1
@ 2022-11-09  4:07 Jerry
  2022-11-09  7:38 ` Fernando Oleo Blanco
  2022-11-09 13:50 ` Stephen Leake
  0 siblings, 2 replies; 5+ messages in thread
From: Jerry @ 2022-11-09  4:07 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: GNAT Speed Comparison on Older Intel versus Apple Silicon M1
  2022-11-09  4:07 GNAT Speed Comparison on Older Intel versus Apple Silicon M1 Jerry
@ 2022-11-09  7:38 ` Fernando Oleo Blanco
  2022-11-10  6:26   ` Jerry
  2022-11-09 13:50 ` Stephen Leake
  1 sibling, 1 reply; 5+ messages in thread
From: Fernando Oleo Blanco @ 2022-11-09  7:38 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: GNAT Speed Comparison on Older Intel versus Apple Silicon M1
  2022-11-09  4:07 GNAT Speed Comparison on Older Intel versus Apple Silicon M1 Jerry
  2022-11-09  7:38 ` Fernando Oleo Blanco
@ 2022-11-09 13:50 ` Stephen Leake
  1 sibling, 0 replies; 5+ messages in thread
From: Stephen Leake @ 2022-11-09 13:50 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: GNAT Speed Comparison on Older Intel versus Apple Silicon M1
  2022-11-09  7:38 ` Fernando Oleo Blanco
@ 2022-11-10  6:26   ` Jerry
  2022-11-13 16:29     ` Simon Wright
  0 siblings, 1 reply; 5+ messages in thread
From: Jerry @ 2022-11-10  6:26 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: GNAT Speed Comparison on Older Intel versus Apple Silicon M1
  2022-11-10  6:26   ` Jerry
@ 2022-11-13 16:29     ` Simon Wright
  0 siblings, 0 replies; 5+ messages in thread
From: Simon Wright @ 2022-11-13 16:29 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-11-13 16:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-09  4:07 GNAT Speed Comparison on Older Intel versus Apple Silicon M1 Jerry
2022-11-09  7:38 ` Fernando Oleo Blanco
2022-11-10  6:26   ` Jerry
2022-11-13 16:29     ` Simon Wright
2022-11-09 13:50 ` Stephen Leake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox