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.
Mario Tomás Serrafero · Aug 2, 2015 at 11:33 am · 1 comment

Sunday Debate: How Can We Get a No-Compromise Phone?

Join us in a fun Sunday Debate on Compromises. Come with your opinions and feel free to read some of our thoughts, then pick your side or play devil’s advocate to get your voice heard and engage in friendly discussion. You can read our food-for-thought or jump straight into the fray below!     Getting an upgrade is a big deal to us power users: it’s our little Android Christmas, where after a long time (for plenty of us, at least)...

XDA NEWS
Mario Tomás Serrafero · Aug 1, 2015 at 03:54 pm · 2 comments

PSA: You Can Optimize Your Note 4’s Recents Menu & RAM

The Note 4 never had the fastest Recents Menu, and despite its 3GB of RAM, its app-holding capabilities only got worse on Lollipop. The infamous RAM bug that plagued the S6 is indeed an annoyance on the Note 4's 5.0.X ROMs. Rumors of an update to fix all of this were confirmed with the first reports of the 5.1.1 update for the Russian Note 4, which seemingly improved the Recents Menu and RAM management. But it'll be a long time...

XDA NEWS
Mario Tomás Serrafero · Aug 1, 2015 at 01:33 pm · 1 comment

XDA Picks: Best Apps of the Week (July 25 – Aug 1)

Apps are at the front and center of any smartphone experience, and with over a million apps on the Google Play Store and new apps being submitted to our forums every day, staying up to date on the latest apps and games can be a hassle. At XDA we don’t discriminate apps - if it’s interesting, innovative, original or useful, we mention them. The XDA Portal Team loves apps too, and here are our top picks for this week.  ...

XDA NEWS