Apple's Mac transitions from Intel Corporation's x86 to the ARM architecture, from a developer's point of view.
Pic Credits: WWDC 2020

Apple's Mac transitions from Intel Corporation's x86 to the ARM architecture, from a developer's point of view.

Apple Silicon is based on ARM architecture, which marks a shift from Intel’s x86 architecture.

So, what’s the difference between ARM and x86?

ARM follows Reduced Instruction set architecture[RISC]. It implies in one clock cycle ARM executes most instructions and it’s simple.

x86 follows Complex Instruction set architecture[CISC]. Which implies to execute each instruction it takes multiple CPU cycles.

So, x86 executes lesser instructions. [It named as complex only :P]

On the other hand, Complex Instruction has an inbuilt load and store into register logic, which allows lesser instructions. Where ARM follows load and store model. 

No alt text provided for this image


Okay, that’s an overview. we will not go under the hood. If you want to learn more, find the links from Stanford docs. [Link 1, Link 2]

So as a developer we don’t need to worry about this x86 and ARM as we don’t write assembly-level code.

In a swift compiler, when we write some code in our IDE, like:

print(“Hello Subhodip!”)

and run the code then compiler translates this human-readable code to binary instructions.

But, What Binary instructions?

If it’s an ARM compiler, it gets ARM instructions, If x86 compiler, it gets x86 instructions, which is different architecture wise.

So If any application code is compiled in x86 architecture, It will not be compiled in ARM architecture.

Ok, now you got me, right? :D

So, in order to make this transition from x86 to ARM as seamless as possible, Apple has introduced two compatibility technologies Rosetta 2 and Universal 2.

No alt text provided for this image


Nearly 15 years ago, in WWDC Steve Jobs introduced the transformation from PowerPC to Intel, At that time I was in high school :D

No alt text provided for this image


What Rosetta2 will be doing?

This will transform the Intel-based(x86) program to ARM. 

No alt text provided for this image


So, how this decision can affect Developers' life?

Life saved Guys. Thanks, Apple for Rosetta2, Developers don’t have to do anything to get their Apps to run on an ARM processor.

Code -> X86 -> Rosetta2 -> ARM[That's how the transformation will go under the hood]

As per the Doc [Link1, Link2]

"Rosetta is a translation process that allows users to run apps that contain x86_64 instructions on Apple silicon. Rosetta is meant to ease the transition to Apple silicon, giving you time to create a universal binary for your app. It is not a substitute for creating a native version of your app.”

"It is not a substitute for creating a native version of your app"

So as per the last line and IMO, Rosetta's support may be there for a couple of years until the smooth transition happens.

So, it’s advisable to create a native ARM version of your application using Xcode 12. If you’re using Swift or the modern frameworks life will not be much tougher.

Not sure how it will behave with Objective C, need to give a try!

You can't test it until and unless you get a Developer transition kit, but you can see if it’s getting compiled or not.

This transformation will make Mac machines very powerful, efficient, and seamless. That's Super cool.

I am really excited to use this new Macbook and deliver cool apps, which probably comes by the end of the Year. Till then let’s wait.

Thanks for reading, please share your thoughts also :)

Soumya Maitra

Sr. Architect | AI Architect I Open Source Contributor l Robotics l Kubernetes | Python l Swift / iOS | Go | LUA | Embeded | C++ | C | ROS | Circuit Design

4 年

The battle was there for long time. https://m.youtube.com/watch?feature=share&v=zi5CIvD7s4I

要查看或添加评论,请登录

Subhodip Banerjee的更多文章

  • Advantages of UITableView over UIScrollView

    Advantages of UITableView over UIScrollView

    In my experience, I have seen most of the time iOS developers use UIScrollView to make the view content scrollable…

社区洞察

其他会员也浏览了