|
本帖最后由 qqisqq 于 2013-10-18 10:04 编辑
futuremark对于物理测试得分的解释:
We've looked at this at great length, and the result is quite interesting. We are working with our relevant partners on this to verify, but at current it seems that:
The compiler does do SIMD and Neon. These do not offer any effect. We even tried doing Neon optimizing by hand to see if the compiler is not doing what it should, but no real effect
The Physics test is uses Bullet, and practically the whole CPU time is spent in the soft body solver, PSolve_links. If you pull this function out of Bullet and bench it separately, you do see a 2x speed increase. However, once it's inside the physics engine, you see nothing.
As this seemed to make no sense, we spent a few days trying to understand what is happening. The result seems to be that if the soft bodies are arranged in memory so that the CPU can access them in a sequential fashion, you get a 2x to 3x increase in speed. This is higher if it can run up the memory, a bit lower if it runs down. The way bullet places the bodies in the memory is a lot more random and they are accesses in a jump-back-and-forth manner. When memory is accessed in this way, all speed gains are lost.
iPhone 5 shows none of this behaviour. It is realistic to assume that in the new 5s we see the new prefetch in action, but it cannot gain traction with a random memory access pattern.
It's good to understand that this is not a flaw in Bullet. Arranging complex memory structures in memory to be in a sequential fashion is non-trivial to say the least. Our hacked solution only worked for us as we knew exactly the data that we would be using. Worrying about where your memory segments lie is not something the programmer should have to worry about anyway.
In terms of our Physics test at large, it does not appear that we have an inherent flaw - our use-case is simply such that no gain is seen. Any game/app using Bullet would see the same, and there are naturally other apps that will see the same (in GeekBench, you can see a few tests where the same thing is happening). |
|