William wrote:OP - have you had chance to test these changes or to test with Android 8?

Thanks,William

Hello William,

thank you for your patience. After I updated my IDE, it shot down Git and I didn't wanted to continue making fundamental changes before fixing that.

First things first, Android 8 Oreo has a marketshare of 0.3 % right now (even below Android 2). Devices with Android 8 are rather rare. Android 5 (2014) and 6 (2015) with 50 % marketshare is therefore used as a base reference by now and probably for the next months - I can't give an ETA for that.

I have compared 3.2.5 and 3.2.4 with one another and measured the same application in two different scenarios:- release mode (this is where the VM optimizer kicks in)- debug mode (profiler - not recording)

It wasn't very easy to measure the performance reliably and it took a while to get consistent results with different configurations. I believe this is due to nature of the big.little CPU architecture that switches to a more powerful CPU when the load increases and vice versa. At the end I used a sleep time of 100 and 1 ms in between.Please note that I forced dyn4j to update every cycle by calling world.update(1000);.

Here are some screenshots from the cpu and memory profiler (debug mode - recording).If you look closely at the very top of this flame chart, you are going to notice that Vector (o.d.g.V) and AABB (o.d.g.A) "<init>" is gone.

And last, a small CPU output with execution times if you are interested. As I said isStatic takes 25 % of execution time. Also, 3.2.5 called a lot more methods this time, I do not know if this was just randomly.

Thank you for the analysis and sorry for getting back to this late. I've made a few very small changes to see if the time in the isStatic method is due to the logic contained therein or due to the function calls and it not being natively compiled/inlined.

Can you give it a try when you get a chance?

x34 wrote:First things first, Android 8 Oreo has a marketshare of 0.3 % right now (even below Android 2). Devices with Android 8 are rather rare. Android 5 (2014) and 6 (2015) with 50 % marketshare is therefore used as a base reference by now and probably for the next months - I can't give an ETA for that.

Not a problem. I was just curious how much of a difference it will make.

x34 wrote:Also, 3.2.5 called a lot more methods this time, I do not know if this was just randomly.

If the methods were just AABB methods, then we could conclude it was due to the code changes made in 3.2.5. From the screenshots you provided, it seems more likely that these are showing up on the profiler now because they take a larger percentage of the execution time since the code change. Another possibility could be what methods the JIT compiler decided to compile and when.