Re: [Interest] QJSEngine vs. (deprecated) QScriptEngine performance - old thing winning!

2016-10-12 Thread Jan 'Koviš' Struhár
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

Re: [Interest] QJSEngine vs. (deprecated) QScriptEngine performance - old thing winning!

2016-10-12 Thread Ulf Hermann
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

Re: [Interest] QJSEngine vs. (deprecated) QScriptEngine performance - old thing winning!

2016-10-12 Thread Ulf Hermann
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

Re: [Interest] QJSEngine vs. (deprecated) QScriptEngine performance - old thing winning!

2016-10-12 Thread Jan 'Koviš' Struhár
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