Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Native phone application performance or C++ performance
Forum Updated to NodeBB v4.3 + New Features

Native phone application performance or C++ performance

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 3 Posters 434 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Clovr
    wrote on last edited by
    #1

    If I create a phone application for Android using C++ Qt qml, will it work at the speed of the C++ language or at the speed of the Java language in Android and Swift in iOS because Qt converts the C++ code into native code?

    1 Reply Last reply
    0
    • jeremy_kJ Offline
      jeremy_kJ Offline
      jeremy_k
      wrote on last edited by
      #2

      Qt doesn't convert C++ to anything. The C++ toolchain determines what form the executable takes.

      Asking a question about code? http://eel.is/iso-c++/testcase/

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SimonSchroeder
        wrote on last edited by
        #3

        "Native code" means native to the processor. The processor does not understand Java or Swift. Swift is also compiled into "native code" whereas Java is usually compiled to bytecode which is then converted to native code by the Java VM. So, at least in theory your C++ Qt app should be faster than Java on Android and has the potential to be as fast as Swift on iOS (if not even faster according to a recent study). QML, however, is a different story: By default this is compiled at runtime (though there is an option to pre-compile it, I think). You might still include some code in JavaScript with QML. JavaScript generally performs worse than Java.

        Generally speaking, you don't pay a performance penalty for using C++ on these platform. But, you might pay a performance penalty for using QML because it is not using native GUI elements (as far as my knowledge goes; I don't use QML personally). For most apps I doubt you'll notice the overhead of using QML.

        Maybe someone with more experience using QML can chime in.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved