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 · Apr 25, 2015 at 11:00 am · 1 comment

XDA Picks: Best Apps of the Week (Apr 17 – 24)

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 we usually share and discuss the latest app releases...

XDA NEWS
GermainZ · Apr 25, 2015 at 10:24 am · 6 comments

Glimpse Notifications: Easier Lockscreen Notifications

Lollipop brought a revamp to the lockscreen, taking away custom widgets but showing your notifications instead. If you're a fan of that, you might want an easier way to check your notifications as they come in, without losing your current lockscreen. Glimpse Notifications by XDA Senior Member xrad offers just that. You'd normally have to turn your screen on manually to see your notifications. Instead, Glimpse Notifications will do it for you when a notification comes in. That doesn't mean...

XDA NEWS
Emil Kako · Apr 24, 2015 at 03:11 pm · 4 comments

What Are the Best Looking Apps on Android?

As more developers are updating their apps with Material Design elements, we're starting to see a plethora of beautiful new apps on the Play Store. But which ones are the best? Let us know what you think the best looking apps on Android are and why.

DISCUSS
Share This