Arm what will it mean for the mac

As a developer I seen a lot of misconceptions as to what the more to Arm64 cpus will mean for the mac. So if eel maybe I should share some of my views/expectations of this before we come to WWDC this year (and maybe the start of our migration).

So here are a few areas I think need addressing:

Will moving to ARM make it easier for developers to adopt Catalyst

No, Catalyst is completely tangential to the cpu instruction set.

Some people will think if macOS is on ARM that means developers don’t need to port their iOS apps to x86 to use Catalyst. However all iOS/iPadOS apps have been able to run on x86 since before the iPhone shipped, as part of our every day development cycle for iOS/iPadOS apps we build x86 versions that is just how the Xcode simulator works, it is a version of iOS that is built and runs on x86. So moving macs to Arm has not affect whatsoever on the difficulty of shipping an app with Catalyst.

Will it be difficult to port applications from x86-64 to Arm64

In comparison to the PPC translation the move from x86-64 to Arm-64 will be a lot simpler for a few reasons:

  1. We all use the same compiler/tooling:

    In the PPC days there were many compilers and build chains in use.

    When the intel translation happened only some of these were made compatible so many developers needed to switch build-chain. Changing compiler and build-chain can be a complex task that is prone to produce lots of bugs.

    However today we all use LLVM, on-top of this we all tend to use a recent version of Xcode. So the efforts to move to the new version of Xcode that will support ARM compilation for macOS will be minimal in comparison.

  2. There just are not that many legacy applications for macOS any more.

    10.15 dropped support for 32bit applications so developers that were unable (for technical or market reasons) to recompile for 64bit are not longer on the platform. What this has done is cleared the slate in advance of the migration to ARM. It means in effect that all applications that run on macOS today are built with recent compilers and will (as long as the developers have source code access) recompile to ARM.

  3. Arm64 is much closer to x86-64 than intel was to PPC

    Key on this one is Endianness, this is how a cpu choses to represent a number. its like reading a word from right to left or left to right (or for some cpus both… ).

    x86 and Arm64 both have the same endianness. This means that they both represent numbers in the same way in memory.

    However PPC has a different endianness this means applications written for PPC commonly expected numbers to be write down the other way around in the system memory. Compiles are good at abstracting this however there is one little thing that can be a big pain and that is when you save data to disk, sometimes it is just simpler to take the raw data you have in memory and dump it to disk, then you can read it back into memory and use it very quickly. however if you suddenly read back data that was saved on a PPC into memory on a x86 cpu all the values are wrong! you need to write a lot of code to convert all the data that users have already saved just so you can read it on the new system, and you need to test, test test that to find all the bugs!

Will we we see a Just-In-Time emulation layer

There as been a lot of assumptions that any form of system to let us use existing x86 applications will be slow. Im of 2 minds here, i think apple would be better of to not provide any compatibility layer as it will push developers to migrate, but I also see that this could have some backlash from users of small tools were the developers are not longer invested in the platform.

That said if we do see a compatibility layer I do not expect it to just be an out-right copy of the roseta style system. Since the PPC move compiler tec has moved on a lot, but also apple have put in more restrictions applications that have lead to a much more predictable execution pathway for most applications that users run.

These days with Hardened runtime applications (required for notarisation so required for 10.16) applications much declare in there app manifest that they require the JIT evaluation rights. Most applications dont need this so dont declare it.

Applications that dont use JIT evaluation just run the code they are unable to modify this at runtime (or otherwise). For these applications you can convert them to ARM (or just LLVM bytecode) staticky rather than at runtime. This is called lifting and is used by companies when they need to patch/port an old application were they have lost the source code (think bank/airline etc). The idea is you read the binnary on disk and convert it to LLVM bytecode, as LLVM bytecode you can run optimisations on it before compiling it back down to machine code. This is a process that takes time, a small app will take maybe 10 minutes a large application would take much longer. But once complete you end up with a fully native, optimised binary that can run just like any other binary.

Some applications do still need JIT based evaluation, for these applications apple can still use the above mentioned lifting for the majority of code that is not JIT based but when the application triggers a JIT jump to read-write memory it can switch to an on-the-fly roseta style emulation. This will mean that for these apps their will be a performance impact for the JIT based parts of the app.

Will we see an ARM macPro soon?

I have seen a lot of suggestions that it will be a long long time before apple could produce an ARM cpu that would be usefull in a macPro. however firstly i think for the transition to work apple need to move fast so that developers feel the fire under our bums.

But also moving to Arm on the mac pro makes more sense than moving something like the iMac. There are a few features that servers grade ARM cpus already have that are very compelling for the macPro use-case:

  • PCIe 5 (the current mac pro just has PCIe 3) it will be at least 8 years before intel get to PCIe 5, PCIe5 is 4 times faster than PCIe 3
  • PCIe bandwidth, there are ARM server cpus with over 128PCIe gen 5 lanes, what this means for the macPro is every single PCIe slot can provide full speed at once.
  • DDR6 this will more than double memory speed, memory speed is one of the largest factors when it comes to the compute performance for large workloads, intel will be at least 6 years away from this
  • Much better high core count scaling, one of the big issues that Xeon cpus have is if they are under heavy load you can max out the power/thermals when your just using 12Cors even if the cpu has 48 cors for heavy workloads these are not of much use at all. ARM cpus that are currently deployed in data centers seem to scale a lot better on this metric.

Note none of the above have anything to do with the instruction set, it is all about the efforts that ARM (the company) have put into supporting new technologies, and how slow intel are at adopting these.

And when it comes to if you can build a large ARM cpus, there are already ARM cpus with 64cores in data-centers today that out-perform their xeon competitors.

18 Likes

Thank you for this write up, very interesting!

That’s a bit all over the place. It conflates using LLVM to compile current Mac apps to various CPUs with using the Catalyst framework to port iOS apps to Macs on varying CPUs. The value of a maturing Catalyst framework for ARM will be to ramp up migration of iOS apps to the Mac, which will be important since not all Mac apps will port to ARM, and iOS has a much larger, vibrant ecosystem of apps that can be drawn upon.

I do agree that a high-powered ARM replacement for the Mac Pro is not on the agenda, but then no one really ever claimed that was possible in the near term, nor thought Apple would prioritize anything but a mass-market ARM notebook for the first year or two anyway.

What i’m saying is Catalyst on ARM or on x86 makes 0 difference to the ability to use it as an iOS developer. The reason for this is all iOS apps are built every day for x86. We will see improvements to Catalyst but there are completely un-related to the ARM migration. The complexity for apple to provide Catalyst is all about the new user interaction model and nothing to do with the cpu instruction set.

After all they have had UIKit running on x86 since before the iPhone shipped.

Maybe i was not clear, i will try to re-phase by above post. I believe apple will be shipping an ARM mac Pro within 2 years of shipping the first ARM mac.

Moving to Arm on the mac pro makes more sense than moving something like the iMac. There are a few features that servers grade ARM cpus already have that are very compelling for the macPro useless:

  • PCIe 5 (the current mac pro just has PCIe 3) it will be at least 8 years before intel get to PCIe 5, PCIe5 is 4 times faster than PCIe 3
  • PCIe bandwidth, there are ARM server cpus with over 128PCIe gen 5 lanes, what this means for the macPro is every single PCIe slot can provide full speed at once.
  • DDR6 this will more than double memory speed, memory speed is one of the largest factors when it comes to the compute performance for large workloads, intel will be at least 6 years away from this
  • Much better high core count scaling, one of the big issues that Xeon cpus have is if they are under heavy load you can max out the power/thermals when your just using 12Cors even if the cpu has 48 cors for heavy workloads these are not of much use at all. ARM cpus that are currently deployed in data centers seem to scale a lot better on this metric.

Note none of the above have anything to do with the instruction set, it is all about the efforts that ARM (the company) have put into supporting new technologies, and how slow intel are at adopting these.

1 Like

I am very much in the market for a Mac Pro (… when I have the money :sweat_smile:)
If I may ask since you seem to know the subject extremely well: how do PCIe cards work with ARM machines? Does the same gear work – like graphical cards or even basic USB hubs? I guess they do, all you need is the right drivers compiled for ARM?

1 Like

What the ARM transaction might bring for the macPro is a price drop. The Xeon cpus (and motherboard chipset/PCIe switch etc) are a good $1000 out of the base price (in raw component costs). Moving to ARM would reduce this a large amount.
However saying that it is possible if the laptops start at 12 Cors that the macPro will start with 32 Core cpu or something. And they will keep the entry level price the same.

They might even not provide a cpu configuration options and all macPros ship with the same 64core or higher cpu. That way they will not need to worry about cpu sockets etc.

Just the same as x86 machines, as long as there are drivers written it will work. PCIe is a cross platform spec, ARM and IBM tend to adopt the new versions of it a few years before intel.

Yes AMD activity support their GPUs on Arm64 linux already and so do Nvidia (not that we will see Nvidia drivers on macOS)

yes this will be no problem at all USB is also an open standard. If you go an count up USB controlers i would not be supprised if the majority of them are connected to ARM cpus. The iPad already works perfectly with USB Hubs.

Yes, USB is simpler since most of this is provided by the OS, for GPUs etc it is all down the the card vendor providing drivers.

1 Like

Thank you for your detailed answers! I really can’t wait for this transition to happen. :slightly_smiling_face:

Wow, thank you for this post! :pray:

Great post!!! Thanks for sharing, I’m more excited about ARM Macs now more than ever!!

1 Like

Price drop? From a company that charges $700 for a set of wheels, and $1000 for a monitor stand. OK, I’ll concede that it’s a possibility. But I think I’ve got a better chance of catching a ride on a UFO. :upside_down_face:

2 Likes

Yeah exactly my thinking very unlikely Apple will drop the price because of using their own ARM. They would perceive that all that IP in the ARM needs to be paid for.

I think it is more likely one might expect (at some point) better optimized cpu-compiler for a given problem/application (i.e faster processing). Secondly, perhaps better battery use as ARM chips can be set up to be less power hungry (then intel).

And if apple is indeed switching to to arm for their main cpu, i betya an apple gpu is not far behind… just speculating of course

1 Like

They already have this LLVM has had many many many years of focused work by apple (and others) to make it the world leading compiler for Arm targets. Apple are the main contributor to the LLVM project.

Even the current GPUs from the iPadPros if you can run them without thermal limits they are more powerfull than the integrated GPUs on the intel products. I do not expect apple to stop using AMD dedicated gpus however.

Unless apple manage to increase the number of macs that ship with dedicated GPUs the R&D budget needed to build them will be difficult to justify if apple were to try to make their own.

1 Like

One thing a lot of people forget is apple is a publicly traded company so you can look up their profit margin. it is between 35% and 38% compare that to other large companies int he hardware space like intel or Nvidia (around 70%). So if the cost of making (that includes the upfront cost of R&D etc) goes down apple will reduce the product price, however normally they will select that instead they will use this extra budget to provide something new/upgrade the base SSD etc.

Apple on hardware products maintains a flat 30% profit margin. (yes this includes things like wheels and monitor stands).

So the thing about the wheels price is all down to volume & apple deciding to make their own rather than just buying other mass produced (high quality) wheels.

You need to consider how many wheels does apple expect to sell. Then you need to consider all fo the upfront costs that go into making a new product. The upfront costs, hiring staff, paying them, getting patents, multiple tests with factories to find a factory that can produce what you want… all fo these upfront costs add up. If you only end up producing 4000 wheels from all of those upfront costs then that upfront cost gets shard out over those 4000 wheels and completely swamps the per-unit production cost.

If apple continue to sell thees wheels for 20 years and end up producing 40,000 of them then it will be lots of profit!

Intel cpus have a very cumbersome instruction set in part because of all the history intel had to drag along. ARM, mostly being RISC and thumb switchable instruction set, can be optimized with a good compiler to have much better running code. Yes i know llvm has been worked on by Apple - their compiler and cpu design teams are really one of th eir (no so) secret weopons. I just meant that an optimized ARM cpu-compiler for desktop apps can lead to a very performant system as compared to an intel system we have today (even though the current macs are no slouch)

1 Like

Yes the the movement to an ARM mean mac developers will be able to make use of all of the work that apple have already been putting into optimising LLVM for thier chips.

I remember when Apple had bet on RISC, hence the PPC transition, loudly touting at the time that it was a better processor design. Funny to see history repeat itself :slight_smile:

1 Like

The instruction set itself is not that important these days. These day cpus don’t run internally directly on thier instruction sets they instread have a translation layer were they decode the instructions (x86 or ARM) into the cpus own micro-op instructions.

For apple ARM is more about being able to control the finner details to meet thier needs of the chips but also the deadlines on when they ship.

1 Like

Thank you for your interesting and informative post. Exciting times ahead!

1 Like

Well…!

Looks like I’ll be waiting for my Mac Pro a few more years :sweat_smile:

I spent my first 20 years after receiving a business degree working for a couple of major manufacturers. One’s been on the Fortune 500 since the 1950’s and has around 100,000 employees. A friend of mine there was a VP of manufacturing based in China.

I apologize if I offended you. I was trying for humor, but remain skeptical of Apple’s pricing.

1 Like