2012-07-24

raspi -- hardfloat-2

Extract from:

Raspbian Benchmarking – armel vs armhf

by
[..]

Performance Results

To try to quantify the optimisations in Raspbian I extended my benchmarking tests and ran them on the two different architectures, Debian armel and Raspbian armhf.

The tests were run on a single Raspberry Pi using two different partitions on the same USB hard disk. The same kernel was used for both sets of tests. Tests were performed multiple times until a “best” score was reached. For the GTKPerf tests both Raspbian and Debian were set to the same GTK theme. I chose not to use the raw data, but present it in an easier to understand format, armhf performance is presented relative to armel performance.

Keep in mind the golden rule of benchmarking: All benchmarks are flawed benchmarks.
Performance comparison between Debian armel and Raspbian armhf
Performance comparison between Debian armel and Raspbian armhf

The chart above shows the performance difference in various applications between Debian armel and Raspbian armhf. Performance improvement varied from 4% to 40% depending upon the application.
The performance improvements seen by non-floating point applications like Gzip and Bzip2 and were related to the ARMv6 instructions being used instead of the ARMv4 instructions. We seem to gain 4-10% in these applications.

GTKPerf showed a 19% improvement in X Windows GUI operations, which should make the Raspberry Pi more usable as a desktop. Quake 3 showed a more modest improvement, but that is because it is already limited by the GPU at 1080p resolutions.

The applications with larger performance improvements are those making heavy use of floating point maths, particularly media en/decoding, which see a huge performance increase. I also saw a 600% increase in Mpeg Layer 3 and Layer 2 encoding performance, but I didn’t include that on this chart as it made the other data difficult to read.

Users of the latest OpenSSL packages will see a ~100% performance increase over these numbers, which is related to an ASM optimisation patch applied by the Raspbian team and isn’t relevant to this test. It does demonstrate how important optimisation is though!


Update20121111:
Conclusion

I believe the QtonPi wiki best sums up my experiences:

Given the preponderance of hardfp performance over its register ignorant peers, this will be useful in eking every last drop of performance out of the hardware.

Buildroot
http://qt-project.org/wiki/RaspberryPi


Raspberry Pi Hard Float Benchmarks
http://pastebin.com/2NZqH2yY

http://www.raspberrypi.org/phpBB3/viewtopic.php?p=61497#p61497

As expected, the hardware floating point execution was significantly faster than the software emulation. Perhaps by a factor of 10x or better.

raspi -- hardfloat

hadrfloat VS. softfloat

1.
root@slitaz:/media/raspbian# env GIT_SSL_NO_VERIFY=true git clone https://github.com/raspberrypi/tools tools
Cloning into 'tools'...
remote: Counting objects: 7222, done.
remote: Compressing objects: 100% (3843/3843), done.
remote: Total 7222 (delta 3966), reused 6255 (delta 2999)
Receiving objects: 100% (7222/7222), 155.84 MiB | 319 KiB/s, done.
Resolving deltas: 100% (3966/3966), done.

2.
root@slitaz:/media/raspbian# du -sh tools
473.6M tools

3.
root@slitaz:/media/raspbian# ls -al tools
total 36
drwxr-xr-x 6 root root 4096 Jul 25 07:38 .
drwxr-xr-x 5 root root 4096 Jul 25 07:30 ..
drwxr-xr-x 4 root root 4096 Jul 25 07:38 arm-bcm2708
drwxr-xr-x 8 root root 4096 Jul 25 07:38 .git
drwxr-xr-x 2 root root 4096 Jul 25 07:38 mkimage
drwxr-xr-x 2 root root 4096 Jul 25 07:38 pkg
-rwxr-xr-x 1 root root 10357 Jul 25 07:38 sysidk

4.
root@slitaz:/media/raspbian# du -sh tools/.git/
157.1M tools/.git/

5.
root@slitaz:/media/raspbian# ls -al tools/arm-bcm2708/
total 16
drwxr-xr-x 4 root root 4096 Jul 25 07:38 .
drwxr-xr-x 6 root root 4096 Jul 25 07:38 ..
drwxr-xr-x 7 root root 4096 Jul 25 07:38 arm-bcm2708hardfp-linux-gnueabi
drwxr-xr-x 7 root root 4096 Jul 25 07:38 arm-bcm2708-linux-gnueabi

6.
root@slitaz:/media/raspbian# tools/arm-bcm2708/arm-bcm2708-linux-gnueabi/bin/arm-bcm2708-linux-gnueabi-gcc -v
Using built-in specs.
COLLECT_GCC=tools/arm-bcm2708/arm-bcm2708-linux-gnueabi/bin/arm-bcm2708-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/media/raspbian/tools/arm-bcm2708/arm-bcm2708-linux-gnueabi/bin/../libexec/gcc/arm-bcm2708-linux-gnueabi/4.7.1/lto-wrapper
Target: arm-bcm2708-linux-gnueabi
Configured with: /home/extra/crosstool/stagingsf/.build/src/gcc-linaro-4.7-2012.04/configure --build=i686-build_pc-linux-gnu --host=i686-build_pc-linux-gnu --target=arm-bcm2708-linux-gnueabi --prefix=/home/dc4/tools/arm-bcm2708/arm-bcm2708-linux-gnueabi --with-sysroot=/home/dc4/tools/arm-bcm2708/arm-bcm2708-linux-gnueabi/arm-bcm2708-linux-gnueabi/sysroot --enable-languages=c,c++ --with-cpu=arm1176jzf-s --with-tune=arm1176jzf-s --with-float=softfp --with-pkgversion='crosstool-NG 1.15.2' --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --with-gmp=/home/extra/crosstool/stagingsf/.build/arm-bcm2708-linux-gnueabi/buildtools --with-mpfr=/home/extra/crosstool/stagingsf/.build/arm-bcm2708-linux-gnueabi/buildtools --with-mpc=/home/extra/crosstool/stagingsf/.build/arm-bcm2708-linux-gnueabi/buildtools --with-ppl=/home/extra/crosstool/stagingsf/.build/arm-bcm2708-linux-gnueabi/buildtools --with-cloog=/home/extra/crosstool/stagingsf/.build/arm-bcm2708-linux-gnueabi/buildtools --with-libelf=/home/extra/crosstool/stagingsf/.build/arm-bcm2708-linux-gnueabi/buildtools --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm -L/home/extra/crosstool/stagingsf/.build/arm-bcm2708-linux-gnueabi/buildtools/lib -lpwl' --enable-threads=posix --enable-target-optspace --disable-nls --disable-multilib --with-local-prefix=/home/dc4/tools/arm-bcm2708/arm-bcm2708-linux-gnueabi/arm-bcm2708-linux-gnueabi/sysroot --enable-c99 --enable-long-long --with-float=softfp
Thread model: posix
gcc version 4.7.1 20120402 (prerelease) (crosstool-NG 1.15.2)
root@slitaz:/media/raspbian#

7.
root@slitaz:/media/raspbian# tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/bin/arm-bcm2708hardfp-linux-gnueabi-gcc -v
Using built-in specs.
COLLECT_GCC=tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/bin/arm-bcm2708hardfp-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/media/raspbian/tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/bin/../libexec/gcc/arm-bcm2708hardfp-linux-gnueabi/4.7.1/lto-wrapper
Target: arm-bcm2708hardfp-linux-gnueabi
Configured with: /home/extra/crosstool/staginghf/.build/src/gcc-linaro-4.7-2012.04/configure --build=i686-build_pc-linux-gnu --host=i686-build_pc-linux-gnu --target=arm-bcm2708hardfp-linux-gnueabi --prefix=/home/dc4/tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi --with-sysroot=/home/dc4/tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/arm-bcm2708hardfp-linux-gnueabi/sysroot --enable-languages=c,c++ --with-cpu=arm1176jzf-s --with-tune=arm1176jzf-s --with-float=hard --with-pkgversion='crosstool-NG 1.15.2' --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --with-gmp=/home/extra/crosstool/staginghf/.build/arm-bcm2708hardfp-linux-gnueabi/buildtools --with-mpfr=/home/extra/crosstool/staginghf/.build/arm-bcm2708hardfp-linux-gnueabi/buildtools --with-mpc=/home/extra/crosstool/staginghf/.build/arm-bcm2708hardfp-linux-gnueabi/buildtools --with-ppl=/home/extra/crosstool/staginghf/.build/arm-bcm2708hardfp-linux-gnueabi/buildtools --with-cloog=/home/extra/crosstool/staginghf/.build/arm-bcm2708hardfp-linux-gnueabi/buildtools --with-libelf=/home/extra/crosstool/staginghf/.build/arm-bcm2708hardfp-linux-gnueabi/buildtools --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm -L/home/extra/crosstool/staginghf/.build/arm-bcm2708hardfp-linux-gnueabi/buildtools/lib -lpwl' --enable-threads=posix --enable-target-optspace --disable-nls --disable-multilib --with-local-prefix=/home/dc4/tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/arm-bcm2708hardfp-linux-gnueabi/sysroot --enable-c99 --enable-long-long --with-float=hard

Thread model: posix
gcc version 4.7.1 20120402 (prerelease) (crosstool-NG 1.15.2)
root@slitaz:/media/raspbian#