On Fri, Aug 19, 2011 at 2:40 PM, Chao Yang chao.yang@linaro.org wrote:
HI Zach, The BP (https://blueprints.launchpad.net/linaro-android/+spec/linaro-android-use-gcc...) and Bug #822113 aim at improving android performance. I think we also need to balance the size and the performance improvement. I used the gcc benchmark tool to benchmark the performance with different configuration: -O3 for arm files only, -O3 for both arm files and thumb files and -fstrict-aliasing. The results can be found at https://wiki.linaro.org/ChaoYang/Sandbox/gccoptimization. Please note, the results are based on linaro_android_2.3.4 for panda and toolchain-4.6-1107. I will benchmark linaro_android_2.3.5 and toolchain-4.6-1108 if necessary when they are stable enough. The image size increases significantly when -O3 is enabled for thumb files, however it does not look like performance has been improved as much as expected. Could you please let me know if you think it is worth building thumb files with -O3 regardless of size? Thanks. Regards
Hi Chao. I'm a bit confused by your numbers. There is no significant difference between the performance or size numbers across the different options you tested, except the Thumb results which grew unexpectedly.
My experience is that Thumb-2 is typically 75 % of the size of ARM and 95 % of the speed, and that -O3 is significantly faster than -O2. I just ran a popular deeply embedded benchmark and found: * In Thumb-2 mode, -O3 is 4.3 % faster than -O2 and 122 % bigger (!) * At -O3, ARM mode is 12.4 % faster than Thumb-2 and 12.2 % bigger
This benchmark is a bit small which is why the code size blew out so much and the -O3 improvement is so small. I used the size of the .text section. bz2 compressing and taking the on disk size to more closely match your method gives: * -O3 is 86 % bigger than -O2 * ARM is 4.4 % bigger than Thumb-2
Is there something strange going on with your benchmarks or options?
-- Michael