Mobile App Performance Redux

Since my original post, I had requests for a more comprehensive test, so I decided to include more mobile development options. In addition to Java, Swift, C#, and Ruby, I ported my logic to Objective-C and JavaScript and C++. Objective-C allowed me to get a true baseline on iOS, and JavaScript allowed me to test webviews, mobile browsers and Titanium. Facebook’s React Native will get tested when it is released.

Testing setup

  • Apple iPad Air 2 / iOS 8.2
  • Apple iPhone 6 / iOS 8.2
  • HTC Nexus 9 (2014) / Android 5.0.1
  • Motorola Moto X (2014) / Android 5.0
  • Xcode 6.3 beta 3(6D532l)
  • Android Studio 1.1.0
  • RoboVM 1.0 (1.0.0.201503101143)
  • RubyMotion 3.6
  • Xamarin Studio 5.8 (Xamarin.iOS 8.8.0.2 / Xamarin.Android 4.20.0.37)
  • J2ObjC 0.9.6.1
  • Titanium Studio 3.4.1.201410281727 / Titanium SDK 3.5.0

The source is located here: https://github.com/harrycheung/Mobile-App-Performance.

The Results

Here is the test results in spreadsheet form.

  • Xamarin crushes my benchmark and is (no longer) the king of the hill. At over 30% quicker than Objective-C, I find it hard to find a reason not to use it. An eagle-eye will remember there is a big difference between this result and the result from my original post. @migueldeicaza pointed out I should not be using DateTime.UtcNow since it has performance limitations. It turns out I had some cruft so I took it out, and this was the result. The performance is so great that I have to imagine there is some magic involved.
  • With the addition of Objective-C, we see that J2ObjC does a pretty good job of transpiling the Java code to Objective-C with only a 10% performance hit. When Swift is added to the picture, both the Objective-C and J2ObjC hybrid apps perform the same. This leads me to conclude the Swift bridge overhead was pretty significant.
  • RoboVM has been officially released, and the performance is still outstanding, especially since I can compare it against Objective-C. I just really wished they supported Xcode storyboards.
  • Of course, Safari and WKWebView exhibit about the same performance, and it is clear that Apple did some work to improve their JavaScript engine since both of those outperform Chrome and Titanium. The most telling observation from the JavaScript apps is how well they all performed relative to RubyMotion. RubyMotion is compiled down to ARM bytecode, and it still cannot compete.
  • I find it a little weird that the Android WebView app perform so differently than Chrome on Android. I assume that both would have the same JavaScript engine, but it appears that they do not.

Update 3/17/15 9pm

Update 3/19/15 3pm

Update 3/22/15 5pm

Update 3/23/15 10am

In general, it seems that the iPad Air 2 does not have a huge speed difference from the iPhone 6 in single core processing. The CPUs are very similar between the two devices with the exception that the iPad has one more core and a 100 MHz speed bump. However, notice that WKWebView performs the same on both devices. I am not sure what to make of that. Usually, that indicates being disk or network bound, but my app does not use any of those resources.

Former Googler, Pseudo-hacker, Frozen waffle master

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store