tl; dr version:
Are there any tests or syntax examples of when (if ever) use c++ instead of JS in Qt 5.7 and / or to determine the performance of JS vs. c++ in Qt 5.7 confirmation of the last really faster than indicated in the documentation for the project.
deep background
I'm a bit new to the world of QML / Qt , and I'm trying to learn the best practices and methods generally provide a fast and reliable code, suitable for a possible deployment to embedded systems.
As a long time developer of C ++, which is sometimes engaged in JavaScript , I always heard from more experienced developers JS , in most cases, the code c++ , compiled to a fast compiler like icpc with optimization, will surpass JS , even in compiled form of bytecode ( an in-depth blog the Dev the Mozilla , discuss it). It really was my own limited experience with JS .
Therefore, I was somewhat surprised to read that Qt 5.7 , " the Qt Documentation "> " Recommendations and suggestions for performance "> " JavaScript " states:
Most QML application will have more JavaScript code in them, in the form of dynamic functions, signal handlers and properties of binding expressions. This is usually not a problem. Thanks to some optimization engine QML, for example, made for binding compiler, it can (in some cases use) to be faster than calling C ++ function. However, caution should be exercised to avoid unnecessary processing is not started accidentally.
This comment draws an interesting picture, but I could not find a lot of information in terms of the real tests in this regard.
Questions: Quantifying Qt C ++ and JS Applications in the Real World
My questions:
- That means "unnecessary treatment" in
JavaScript ? - As said "unnecessary treatment"?
- Are there cases when
c++ still provides performance advantage over JS for use with the code QML / Qt ? (IO?)
Examples of quantitative information about the performance associated with the Qt Javascript
To give a few examples of the type of measurement information that I was looking to identify the operator's documentation, I found these QML specific examples. Although none of them comes to my question, it seems, are good examples of the information necessary for the interpretation of the wording of the document:
Both of them have some good charts illustrating the quantitative test QML , implemented Qt (of w / JavaScript calls) compared with other code / version. The problem is that I could find nothing of the kind for the performance of c++ vs. JS . Therefore, it is difficult to try to understand exactly how much better JS performance is c++ to code Qt , if it is really better than the claims Documentation. It is also difficult to determine how to avoid the pitfalls discussed without such information.