Piotr

Piotr

2p

2 comments posted · 0 followers · following 0

13 years ago @ AndroidGuys - Benchmarks Put Android... · 0 replies · +1 points

As far as I know Android uses softfp, so all floating point operations result in calls to C routines from shared library. This library uses software emulated float operations for hardware without VFP. But for devices with VFP it uses real hardware floating point operations (at least it should). This method introduces additional overhead, but this way your code will utilize hardware floats if it's supported by hardware and will still run fine in the absence of VFP.

Now, if I'm wrong and this is not the case, then things get a little more complicated and it may be as you wrote. Guess I'm gonna have to check that for myself, as soon as I get my hands on some VFP enabled device.

13 years ago @ AndroidGuys - Benchmarks Put Android... · 2 replies · +1 points

Hmm, interesting.

However, such increase in performance is a little bit weird. I'm currently developing a comprehensive benchmarking application for Android and I also incorporated Linpack there (which is/was a standard floating point benchmark). However, I made both native and java ports of this benchmark.

The results I observed on my HTC Magic is that native code is roughly 2-3 times faster than java code running on Dalvik. I would expect it to be similar on Nexus One. So without running the same code natively, it's hard to interpret those results. Note that JIT can be smart enough to skip whole parts of code, especially those that get repeated in loop and don't produce side-effects. So without knowing how this application works, it's hard to say anything conclusive.