Performance: MOE vs native iOS code

Hello,

I’m curious about differences in app performance with Multi-OS Engine compared to native swift/obj c code.

Are there any test results (f.e. executable time of the same complicated mathematical operation using MOE app and native iOS app) which would show if there are any visible differences in performance?

All the best,
Mateusz

Which operations are you interested ?
Can you suggest code to perform ?

We have some kind of perf framework and some tests.
However we use it to compare different compilers: MOE, RoboVM, GWT, Android, TeaVM.

Nothing particular, to be honest I’ve been looking for something like:
http://trigger.io/cross-platform-application-development-blog/2012/02/24/why-trigger-io-doesnt-use-phonegap-5x-faster-native-bridge/
or

Hi Kirill,

would you be kind to open-source these tests? We could then add it to our CI system to see if there is any perf regression. We currently only use the scimark2 benchmark from 0xbench.

Best Regards,
Gergely

Hi Gergely,

Mostly, we are testing our internal classes and scenarios.
I do not think it is possible to open-source all.
Typical generic test looks like this:
https://gist.github.com/kirillp/7a0e613141d3133960320560d00a96b6
MOE specific tests looks like this:
https://gist.github.com/kirillp/d567e98c306066d34bc3d4eeef497314

Interesting results:
1k setForegroundColor native | 803 op/sec
1k setForegroundColor Java | 57 op/sec

native code is to bind the following obj-c method instead of using UIColor.colorWithRedGreenBlueAlpha

> void setForegroundColor(CFMutableDictionaryRef dict, float r, float g, float b, float a) {
>   UIColor *color = [UIColor colorWithRed:r green: g blue: b alpha: a];
>   CFDictionarySetValue(dict, NSForegroundColorAttributeName, (__bridge const void *)(color));
> }

And this is the “framework” :slight_smile:

There are also some math matrix tests and some persistence tests(Quaternion -> char[] -> String)
That’s almost it that I can share I think.

1 Like