[Interest] QJSEngine vs. (deprecated) QScriptEngine performance - old thing winning!
Ulf Hermann
ulf.hermann at qt.io
Wed Oct 12 11:40:42 CEST 2016
> 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 around, e.g. as a JS function. From the docs:
> QJSValue fun = myEngine.evaluate("(function(a, b) { return a + b;})");
> QJSValueList args; args << 1 << 2;
>QJSValue threeAgain = fun.call(QJSValue(), args); regards,
Ulf
More information about the Interest
mailing list