[maemo-developers] [maemo-developers] Speed test with vfp (floating point) on N800

From: Simon Pickering S.G.Pickering at bath.ac.uk
Date: Fri Feb 16 11:42:16 EET 2007
 

> > > The whetstone results were a little surprising, in that the vfp code 
> > > wasn't orders of magnitude faster than the softvfp code as expected, 
> > > however this is probably (as a guess) caused by libm not being compiled
for vfp.

<snip>

> Duh, I was looking at the wrong results from 
> http://people.bath.ac.uk/enpsgp/benchmarks/N800-fp-tests.txt, 
> my numbers match those in there even with vfp libm...

I compiled glibc last night and statically linked the whetstone vfp benchmarks
with libm.a and got the following results:

Nokia-N800-51:/home/user/benchmark# ./whetstone.vfp.static_libm.O0.out -c 2000

Loops: 2000, Iterations: 1, Duration: 3 sec.
C Converted Double Precision Whetstones: 66.7 MIPS

Loops: 2000, Iterations: 1, Duration: 4 sec.
C Converted Double Precision Whetstones: 50.0 MIPS


Nokia-N800-51:/home/user/benchmark# ./whetstone.vfp.static_libm.O1.out -c 5000

Loops: 5000, Iterations: 1, Duration: 4 sec.
C Converted Double Precision Whetstones: 125.0 MIPS


Nokia-N800-51:/home/user/benchmark# ./whetstone.vfp.static_libm.O2.out -c 5000

Loops: 5000, Iterations: 1, Duration: 3 sec.
C Converted Double Precision Whetstones: 166.7 MIPS

Loops: 5000, Iterations: 1, Duration: 4 sec.
C Converted Double Precision Whetstones: 125.0 MIPS


Nokia-N800-51:/home/user/benchmark# ./whetstone.vfp.static_libm.O3.out -c 10000

Loops: 10000, Iterations: 1, Duration: 4 sec.
C Converted Double Precision Whetstones: 250.0 MIPS


Nokia-N800-51:/home/user/benchmark# ./whetstone.vfp.static_libm.Os.out -c 5000

Loops: 5000, Iterations: 1, Duration: 4 sec.
C Converted Double Precision Whetstones: 125.0 MIPS

Loops: 5000, Iterations: 1, Duration: 3 sec.
C Converted Double Precision Whetstones: 166.7 MIPS


So it looks like my compilation worked okay, and increased the MIPS count quite
significantly when compared with the previous non-vfp-libm results in
http://people.bath.ac.uk/enpsgp/benchmarks/N800-fp-tests.txt.

The static binaries are here: http://people.bath.ac.uk/enpsgp/benchmarks

I note that the build process was a fiddle (mainly due to my not knowing the
debian way), and it took a couple of goes before my CFLAGS were used for the
build. I also note that when I tried using the following "-mcpu=arm1136j-s
-mfpu=vfp -mfloat-abi=softfp", the build failed (I don't know why - didn't look
too hard. I don't have cpu transparency setup though), but removing
"-mcpu=arm1136j-s" worked, and that's what I've been using.

I've also uploaded the vfp libm (libm.so.6 and libm.a) to the same location so
you can benefit without re-compiling anything unless you really want. Try
setting LD_LIBRARY_PATH before running a binary like so:

$ LD_LIBRARY_PATH=/path/containing/vfp-libm/:$LD_LIBRARY_PATH /path/to/binary

E.g.

$ LD_LIBRARY_PATH=/home/user/:$LD_LIBRARY_PATH
/home/user/benchmarks/whetstone.vfp.O0.out

It's easy to produce a wrapper script that you can call with a binary name so it
can handle all of the LD_LIBRARY_PATH business and save you from typing it every
time.

I'm not sure whether mplayer/any mplayer codecs require functions from libm (I
understand that the wmv codec does), I wonder how much of an improvement this
might make (and to other apps as well)?

Regards,


Simon



More information about the maemo-developers mailing list