On 10/12/2016 01:42 PM, Ulf Hermann wrote:
QJSEngine does not cache the compilation results if you just pass in
plain strings. I also don't think QScriptEngine can do this here (but
I haven't checked). QScriptEngine might be clever enough to
automatically use the interpreter rather than
QJSEngine does not cache the compilation results if you just pass in plain
strings. I also don't think QScriptEngine can do this here (but I haven't
checked). QScriptEngine might be clever enough to automatically use the
interpreter rather than JIT-compiling such small expressions. You can
The usage scenario fits my needs, that is the reason to evaluate exactly this
way.
I mean - should the QScriptEngine be deprecated, the QQmlEngine/QJSEngine
should also have ways to utilize some form of JIT/preparse. Even in the first
pass where JIT cannot be effective (or when I parse just
On 10/12/2016 11:40 AM, Ulf Hermann wrote:
QJSValue result = qmlEngine.evaluate(item.m_expression.sourceCode());
I guess you are mostly profiling the JIT compiling, not the actual
evaluation. In order to get realistic results you should keep the
compiled representation of the expression