Author Topic: jPCT-AE and Dalvik vs. ART  (Read 1162 times)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
jPCT-AE and Dalvik vs. ART
« on: November 22, 2013, 03:27:22 pm »
You might have heard about this already: http://www.androidheadlines.com/2013/11/android-apps-could-become-twice-as-fast-thanks-to-art-compiler-in-android-4-4-kitkat.html

After my Nexus 7 (2013) got it's OTA update to 4.4, i gave ART a try and the results are promising so far. I tested An3DBenchXL and my RPG. There are the results in fps per test scenario:

An3DBench-Dalvik: 59 / 23 / 37 / 59 / 40 fps

Ab3DBench-ART:   59 / 27 / 46 / 59 / 44 fps

As you can see, the Double Dragon and the Cloth test are already @ refresh rate but all other tests benefit from ART from 10 to 25%.


RPG (city / landscape / graveyard):

Dalvik: 45 / 29 / 26

ART:   55 / 32 / 27

Again, the app benefits from 4 to 22%. One thing to keep in mind when comparing these numbers is that the Nexus 7 uses an Adreno GPU, which suffers from draw calls more than others. So the actual improvement in VM speed might be larger, it just doesn't help due to the draw call bottle neck.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: jPCT-AE and Dalvik vs. ART
« Reply #1 on: November 26, 2013, 05:47:39 pm »
In addition, GC behaviour seems to be smoother with ART. It's hard to tell, because the VM isn't as verbose as Dalvik in that part but the hick-ups are less noticable.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: jPCT-AE and Dalvik vs. ART
« Reply #2 on: November 27, 2013, 09:49:24 pm »
I did some additional tests with Dalvik vs. ART. This time on my Nexus 4. The largest improvement is in the spacial sorting code, which sorts all trees and bushes and stuff into a kind of quadtree. This takes 1.5s on Dalvik and 800ms on ART.

Offline kiffa

  • long
  • ***
  • Posts: 199
    • View Profile
Re: jPCT-AE and Dalvik vs. ART
« Reply #3 on: November 30, 2013, 08:04:45 am »
I have heard about this before, but i have no device to test it now. Thanks for your test, and there are some details i will be interested in:

1, Will ART improve the cpu bound only(mainly)? For a game, which means AI、physics、draw calls...

2, What about the runtime-debuging?

3, How larger of the installed-apk will increase when enable ART?

4, From the result of QSort test of the article, seems there is also an obvious performance gap between JNI and ART.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: jPCT-AE and Dalvik vs. ART
« Reply #4 on: November 30, 2013, 05:27:38 pm »
ART seems to improve garbage collection as well. So it's not only faster but also smoother. I haven't noticed any differences in using the Eclipse plugin and DDMS in combination with ART. Then again, i'm not using any debuggers, so i can't comment on that. The apk has the same size, because it's the same apk. On the device, the code size increases between 10 and 20%.
Of course there's still a gap between native and ART, because it's still a kind of vm/managed environment. But given that it's not even in beta stage, i expect some improvements before it will become the official runtime.