Qt vs Native applications for mobile platforms



  • Hello, I'am doing my final master thesis and the subject is Qt crossplattform vs Native mobile applications. Before i started this i had no Qt experience just c++. So far ive been comparing how Qt and Native applications perform during calculation tasks and Ui tasks by creating small applications to test it. The calculation task was to sort big chunk data in an array and the ui task was to present text to the screen and measure time doing the tasks. I use qml/xml to create ui objects and c++/java to interact with them. Same code just different languages. When running the tests Qt had much better results and I was a little bit shocked tbh. The calculation task i could understand since it is in c++? But the Ui task.. Now to my question, Is it possible for Qt to perform better than a native app or do you think ive done some horrible misstake?

    I still have to create native iOS applications and test those tho but im already suprised by the result :P

    Thanks.


  • Qt Champions 2016

    What platform ?
    Android?

    Also what do you compare ?
    java vs c++
    or javascript ?

    Is it possible for Qt to perform better than a native app or do you think ive done some horrible mistake?

    Well its possible due to Qt sometimes provide a lighter implementation than the native widget. ( vs wrapping it)
    Also QML is opengl enabled and might draw faster in some cases.

    Also if you compare to java, you should read up on tweaking for performance.
    You might use something that is slow in java to screw the results a bit.

    Overall, its hard to benchmark directly.

    this might interest you.
    http://benchmarksgame.alioth.debian.org/



  • @mrjj Yep at the moment ive only done comparisons on the Android platform but will do iOS soon. The Qt applications are in C++ and the Native Android ones in Java. And ye i can feel that Qt is much lighter. I was just a little suprised how well the Qt applications were performing :P Thanks for your reply.


  • Moderators

    @dragge Well, Qt can be considered as "native" as well, depends on how you define "native". Qt is a C++ framework and C++ applications are compiled to binary code which is directly executed on the CPU - from this point of view Qt is native. As far as I know Android applications written in Java are compiled to native binaries during installation or first run (since Android 5?, not sure). You could expect these apps to have similar performance but I'm not sure how well the Java compiler used by Google can optimize the code. Probably common C++ compilers are better.



  • @jsulm What you say is probably right. I didnt really think about those things when i started the project... Theres so much things that can make the benchmarks show off results. But i will continue the way i started. Comparing "Native" applications created with Google and Apple tools, Android Studio and Xcode with applications created with Qt. Thanks for the explanation.




Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.