Tomek Kondrat · Apr 1, 2014 at 04:30 pm

XDA Myth Busters: Linaro 4.7.4 vs. GCC 4.7

printlogoThe importance of an optimized toolchain is one of the hottest topics in the Android dev world. Many of you might have heard about GCC and Linaro, which are the two biggest projects of this type. GCC is an old hand that was initially releases in 1987, while Linaro is a relatively young player at only four years old.

Let’s first dive into the history of these two projects. As I said earlier, GNU Compiler Collection is old. Over the years, it has been used to compile various projects, including Android. Google decided to use versions 4.6 and 4.7 as their default toolchains, and I would like to focus on version 4.7 in this series of tests.

Linaro was launched in 2010, and it’s been optimized for ARM architectures. And of course, ARM is used in the vast majority of Android-powered smartphones and tablets. You can find Linaro as a toolchain used to compile kernels or whole ROMs, and many developers claim this toolchain is faster and more powerful than GCC.

Inspired by our Developer Admin Pulser_G2, I decided to give this myth a shot and see whether these claims are real. To do this, I first downloaded the AOSP source. I built an aosp_mako-eng target for my Nexus 4 using the default set of prebuilts from Google. After make otapackage, I got 183115481-byte zip file ready to flash. After, I downloaded the Linaro 4.7.4 toolchain and replaced GCC in prebuilts/gcc/linux-86. I performed the necessary changes to set level O3 of optimization. As AOSP supports only prebuilt kernels (without modifications), I built a kernel on my own with Linaro and replaced the kernel in mako-kernel with my own blob.

 Below you can see the two resultant archives. As you can see, the Linaro archive is slightly bigger, so this toolchain actually does something to bin and xbin folders. The kernel file itself is also bigger.

Screenshot from 2014-03-31 13:33:06 Screenshot from 2014-03-31 13:32:47

But the file size is not the most important thing. Instead, let’s focus on performance. To measure this, I used AnTuTu benchmark. For increased precision, I ran each test three times. As you can see below, the difference is quite big. However, I wouldn’t put too much blind faith in these tests, as the results differed on every test. That said, Linaro was few points better than GCC—but AnTuTu is not that reliable as you may think.

GCC

device-2014-03-31-191204 device-2014-03-31-191138 device-2014-03-31-191123

 

Linaro

device-2014-03-31-131458  device-2014-03-31-131356device-2014-03-31-131419

The following tests were performed with 3DMark to see if a toolchain can impact graphics performance. The difference was even more significant than with Antutu. You may gain few FPS with GCC, but overall smoothness is better with Linaro. The score is also a bit higher.

GCC

device-2014-03-31-193331device-2014-03-31-193339 device-2014-03-31-192745device-2014-03-31-192757 

Linaro

device-2014-03-31-183033 device-2014-03-31-183026 device-2014-03-31-181457 device-2014-03-31-180803

 

The final test was run using the game Asphalt 8: Airborne. Below you can see two videos of the game running on both toolchains. The first was made with Linaro, while second with GCC. Personally, I think that Linaro feels a bit smoother than GCC, but that may just be the placebo effect since this was not a double-blind test. Both kernels were stock and free from tweaks, overclocking, and any other fancy tweaks to improve the performance.

 

So is Linaro Better?

Although I was skeptical at first, I must admit that Linaro seems to be a better choice than GCC—at least on my hardware configuration. The OS felt more responsive and faster than when it was built using GCC. However, GCC is still rock solid, so if you require ultimate stability, it may still be the best choice.

In the next episodes, I will try to compare other toolchains such as SaberMod and Linaro 4.8. Please let us know about your favorite toolchains in the comments below. And if you would like us to test any other toolchains, please say so!


_________
Want something on the XDA Portal? Send us a tip!
TAGS:

Tomek Kondrat

eagleeyetom is an editor on XDA-Developers, the largest community for Android users. Tomek is the only Polish moderator on XDA Developers. He graduated from the University of Warmia and Mazury in Olsztyn with a degree in journalism and public communication in 2013. He's a big fan of football (not hand egg), post rock and cooking. A total addict of mobile technology, especially Android. Currently flashes dozens of custom ROMs on his OPO. View eagleeyetom's posts and articles here.
Aamir Siddiqui · May 27, 2015 at 02:12 pm · 1 comment

Samsung Galaxy S6 To Receive Major Camera Update

When the Samsung Galaxy S6 and S6 Edge were launched, they became the prime focus for all discussions as Samsung took a break on their traditional design philosophy and opted for something that their flagship lineup hadn't seen before. But along with the design, a lot of Android enthusiasts were also impressed by another aspect of the flagship duo: their camera. Even traditionally, the primary camera on Samsung's flagship lineup has been one of its stronger points as compared to other...

XDA NEWS
Faiz Malkani · May 27, 2015 at 01:34 pm · 4 comments

Tactile: An Addicting Game with Beautiful Material Design

The game industry has been around for decades, catering to a wide spectrum of people, young gamers and elder ones, casual gamers and serious ones, and for an industry with such specifications, innovation isn't the only fuel for success. An increasingly large number of games draw inspiration from another and build on top of that idea, and Tactile is one such product, an excellently executed brainchild of a mashup between Tetris and 2048. For 2048 veterans, the game will come across as relatively familiar....

XDA NEWS
Mario Tomás Serrafero · May 27, 2015 at 12:27 pm · 3 comments

Android’s Consistency and The User Experience

This is a site of power users, and it is fair to say that most of us are more knowledgeable about Android than the average Joe. We tinker and tweak by customizing every corner for endless hours, until we arrive at a comfortable software configuration. In contrast, a large chunk of Android users don’t even use a different launcher - and many don’t know what a launcher is in the first place!   When we get so involved in our...

XDA NEWS
Share This