SEGGER Embedded Studio on Apple M1 and Intel i7

In 2016, we started releasing 64-bit builds of Embedded Studio for Windows. This improved the build performance by about 20% compared to the 32-bit version.

Apple recently released the M1, which uses the AArch64/ARMv8-A instruction set. How does Embedded Studio perform on the new chip? We did the comparison again.

Apple M1 and Rosetta 2

The M1 is Apple’s first system on chip (SOC) designed specifically for Mac.

In contrast to most CPUs, which use the x86-64 instruction set architecture, the M1 cores use the AArch64/ARMv8-A instruction set. While x86-64 is an extension of x86, and 32-bit x86 applications can be natively executed on x86-64, ARM code is entirely different.

To maintain compatibility with thousands of existing applications, Apple introduced Rosetta 2, an emulator that translates x86-64 instructions to run on M1. Translation is a one-time event, usually done on installation or at the first start-up of an application. After that, the application can be natively executed, just like on any other machine. Translation takes some time, and translated code is not as good or as efficient as original code. For optimal results, Apple encourages developers to build applications specifically for the M1. Natively compiled source code produces fewer instructions to execute or more efficient instruction sequences. Such natively optimized code requires less time to execute and can result in less power usage.

Embedded Studio for the M1

Following our path to make our tools available on all platforms and to provide best performance on each of them, we started building Embedded Studio for the M1.

Since the release of Embedded Studio V5.40 there are now two packages for macOS, one for Intel x86-64 and one for Apple M1.

Performance Comparison: Apple M1 vs Intel

Now that we have the same application for both architectures, we can compare it on two MacBooks. How well does the M1 perform software development tasks?

Step one: Install Embedded Studio on two of our MacBooks: On a 2016 MacBook Pro with 2.7 GHz Intel i7 we install the x86-64 build, and on the new MacBook Pro with the Apple M1 we install both builds.

Step two: Build a project. For a real-world test, we select a SEGGER Flasher firmware project. It consists of about 570 C source files and produces a 740 kByte application image. All test runs start from a clean project and run a complete build of the firmware.

The Results

MacBook Pro, Intel i7, x86-64 completed the task in 30 seconds.
MacBook Pro, M1, x86-64 (translated) completed it 31 seconds.
MacBook Pro, M1, ARM (native) completed in 17 seconds.

The performance of the M1 is impressive. For the natively compiled code, the M1 is almost twice as fast as both the Intel i7 and the M1 running translated code.

Even the translated Intel code performs about as fast on the M1 as on the Intel Mac, which shows the power of Rosetta 2 and the tightly coupled components of the M1.

Conclusion

Apple has outdone itself with the M1.

Faster performance and more energy efficient code saves valuable time and can boost your performance. You can get more work done in a day. And as a nice side effect you can save battery power with energy-efficient code, which increases the runtime of your MacBook and you can get even more work done while on the road.

Building Embedded Studio for the M1 has been a wise decision. You can profit from its performance in your day-to-day work – on any computer.

If you upgrade to an Apple M1, you should give it a try.