There are several different cross-compiler toolchains available for building the Android Linux kernel. There is the offical TC released by Google as part of the Android NDK (http://developer.android.com/sdk/ndk/index.html) as well as several TCs released by third parties which claim to be more optimized for the target platform. While the most popular of these third party TC is the one from CodeSourcerey (https://sourcery.mentor.com/sgpp/lite/arm/portal/release1803), Linaro also offers one TC very popular by developers of custom kernels (http://www.linaro.org/downloads/) and there also is the Mjolnir TC by redstar3894 and intersectRaven (https://github.com/redstar3894/Manifest/blob/master/README.mkdn).
I have read of lot of praise for these optimized TC from different kernel developers that all claim that these do much better than the offcial Google TC, however to my knowledge up until now nobody actually took the effort of investigating the effect of the TC and most devs simply assume that a TC marketed as optimized by their creators is actually performing better.
So to investigate the performance of the different TC, I compiled a kernel (GLaDOS kernel for ICS) with the following four different TC:
1. Offical Google arm-linux-androideabi-4.4.3 (part of android-ndk-r7)
2. CodeSourcerey arm-2011.03-41-arm-none-linux-gnueabi
3. Linaro android-toolchain-eabi-linaro-4.6-2011.11-4-2011-11-15_12-22-49-linux-x86
4. Mjolnir arm-eabi-4.6-mjolnir-20111006
Also while I was at it, I investigated the effect of the compiler flags '-fgcse-after-reload' and '-ftree-vectorize' (see https://github.com/Ezekeel/GLaDOS-nexus-s/commit/6e51fc5c0be5a9e7906573f78e00c9aee41f32ee#comments) by compiling a version with the CS TC which did not include these flags.
I performed the following two tests for the kernels:
Test I: Measured the bootup time including a rebuild of the Dalvik-cache after a wipe (2 times).
Test II: Performed a benchmark with AnTuTu Benchmark v2.4.3 including CPU/memory, 2D and 3D graphics (3 times).
Results:
Test I:
Test II:
Google TC:
CodeSourcerey TC:
CodeSourcerey TC without flags:
Linaro:
Mjolnir:
Average:
As one can clearly see from the results, the so-called optimized TCs perform not better than the official TC released by Google in any measurable way. So the improvements that some kernel devs have felt cannot be backed up by these data and is most likely wishful thinking. Also note that the compiler flags '-fgcse-after-reload' and '-ftree-vectorize' do not have to seem any adverse effects regarding the performance of the kernel.
Update:
In case anyone wants to try some benchmark fun for himself, here are the kernels (GLaDOS kernel for ICS).
Google: http://www.multiupload.com/QK5T6SHUFC
CS: http://www.multiupload.com/25021GRFT0
CS-flags: http://www.multiupload.com/98TCZOKLWA
Linaro: http://www.multiupload.com/XZJN2J9DOE
Mjolnir: http://www.multiupload.com/QK4I6R8DGR
I have read of lot of praise for these optimized TC from different kernel developers that all claim that these do much better than the offcial Google TC, however to my knowledge up until now nobody actually took the effort of investigating the effect of the TC and most devs simply assume that a TC marketed as optimized by their creators is actually performing better.
So to investigate the performance of the different TC, I compiled a kernel (GLaDOS kernel for ICS) with the following four different TC:
1. Offical Google arm-linux-androideabi-4.4.3 (part of android-ndk-r7)
2. CodeSourcerey arm-2011.03-41-arm-none-linux-gnueabi
3. Linaro android-toolchain-eabi-linaro-4.6-2011.11-4-2011-11-15_12-22-49-linux-x86
4. Mjolnir arm-eabi-4.6-mjolnir-20111006
Also while I was at it, I investigated the effect of the compiler flags '-fgcse-after-reload' and '-ftree-vectorize' (see https://github.com/Ezekeel/GLaDOS-nexus-s/commit/6e51fc5c0be5a9e7906573f78e00c9aee41f32ee#comments) by compiling a version with the CS TC which did not include these flags.
I performed the following two tests for the kernels:
Test I: Measured the bootup time including a rebuild of the Dalvik-cache after a wipe (2 times).
Test II: Performed a benchmark with AnTuTu Benchmark v2.4.3 including CPU/memory, 2D and 3D graphics (3 times).
Results:
Test I:
Code:
Google 1:34 1:34
CS 1:34 1:34
CS-flags 1:34 1:34
Linaro 1:34 1:34
Mjolnir 1:34 1:34
Test II:
Google TC:
CodeSourcerey TC:
CodeSourcerey TC without flags:
Linaro:
Mjolnir:
Average:
Code:
Google 2715
CS 2725
CS-flags 2718
Linaro 2718
Mjolnir 2716
As one can clearly see from the results, the so-called optimized TCs perform not better than the official TC released by Google in any measurable way. So the improvements that some kernel devs have felt cannot be backed up by these data and is most likely wishful thinking. Also note that the compiler flags '-fgcse-after-reload' and '-ftree-vectorize' do not have to seem any adverse effects regarding the performance of the kernel.
Update:
In case anyone wants to try some benchmark fun for himself, here are the kernels (GLaDOS kernel for ICS).
Google: http://www.multiupload.com/QK5T6SHUFC
CS: http://www.multiupload.com/25021GRFT0
CS-flags: http://www.multiupload.com/98TCZOKLWA
Linaro: http://www.multiupload.com/XZJN2J9DOE
Mjolnir: http://www.multiupload.com/QK4I6R8DGR
Last edited: