Last week, I compared the speed of the 64-bit and the 32-bit build of Embedded Studio and the GCC compiler. The 64-bit version was the clear winner, with a performance gain of about 5 – 20%.
But what can we get from working with different operating systems?
At SEGGER, we developers are free to select the operating system to use. Most of us use Windows, as most of us are most familiar with it, but also because a lot of tools we use are available for Windows only.
Choosing one or the other operating system is not only a question of personal preferences, but may also increase efficiency.
In times of virtual machines and programs being available cross-platform, I wanted to find out which OS delivers the best performance. The results were quite surprising!
I did the same thing I did in my last post: I used different builds of Embedded Studio to compile a large project. The compiler used in this case is GCC. Instead of just benchmarking the 2 Windows builds, I now included Linux and Mac.
For the first test I booted up the Linux distribution, a Ubuntu 16.04 64-bit, I installed as a second OS on my computer, and re-compiled the project. As this is the same machine I used to benchmark the Windows builds, I expected similar results as with Windows 7 64-bit. Much to my surprise, it turned out Linux is considerably faster!
Using Linux saves a lot of time when building. In this case it is amazing 70% faster than the Windows 64-bit build. It took only 1:09 instead of 1:57.
Since I am one of those Windows users, I wanted to find out if this performance gain can also be achieved using Linux in a virtual machine.
It turns out that it can. Linux is faster even when run as a virtual machine on Windows! With 1:30 it is quite a bit slower than the “native” Linux, but still much faster than the Windows executable.
When I am not in the office I work with a MacBook Pro, hardly on OS X, but in a Windows VM. How about comparing the performance of Embedded Studio on OS X, on the Windows VM, and a Linux VM on the same hardware?
Linux does even better. With 0:46 for a full re-build it is 130% faster than the Windows (1:47) and even 117% faster than OS X using eight instead of just four building threads (1:40).
Am I going to switch to Linux now?
The results show that Linux has been faster in all configurations. Even though I cannot completely switch to Linux as my day-to-day work environment, I will do more in the Linux virtual machines, which I have set up now, and see where it can further improve my efficiency.
I also learned that I need to ask for a better desktop PC for my work.
Coming up next: We know Embedded Studio is fast, but how fast is it compared to other IDEs? I plan to show this comparison in the next article of this series.