Hello guys,
I prodded you guys today about getting some numbers (and Jedrzej
promptedly said he would!), but I ended up doing some measurements of
my own :o) What I did was to run QtDeclarative's
tests/benchmarks/declarative/binding/tst_binding, with the case
"basicproperty" and the QML optimizer disabled (so JS is executed). I
remember doing a similar test before, but I didn't post it to the list
:-/
This is modularized Qt compiled release mode with our v8 branch and QtQuick2...
[cmarcelo@dalek]~/Projects/Qt/qt5/qtdeclarative/tests/benchmarks/declarative/binding%
QML_DISABLE_OPTIMIZER=1 ./tst_binding basicproperty -iterations 100000
********* Start testing of tst_binding *********
Config: Using QTest library 4.8.0, Qt 4.8.0
PASS : tst_binding::initTestCase()
RESULT : tst_binding::basicproperty():"value":
0.01520 msecs per iteration (total: 1,521, iterations: 100000)
RESULT : tst_binding::basicproperty():"value + 10":
0.01994 msecs per iteration (total: 1,995, iterations: 100000)
RESULT : tst_binding::basicproperty():"value + value + 10":
0.02559 msecs per iteration (total: 2,559, iterations: 100000)
RESULT : tst_binding::basicproperty():"myObject.value":
0.02223 msecs per iteration (total: 2,224, iterations: 100000)
RESULT : tst_binding::basicproperty():"myObject.value + 10":
0.02109 msecs per iteration (total: 2,109, iterations: 100000)
RESULT : tst_binding::basicproperty():"myObject.value + myObject.value + 10":
0.02861 msecs per iteration (total: 2,861, iterations: 100000)
PASS : tst_binding::basicproperty()
PASS : tst_binding::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped
********* Finished testing of tst_binding *********
and Qt 4.7 latest in release mode as well
[cmarcelo@dalek]~/Projects/Qt/build/4.7-release/tests/benchmarks/declarative/binding%
QML_DISABLE_OPTIMIZER=1
LD_LIBRARY_PATH=$HOME/Projects/Qt/build/4.7-release/lib ./tst_binding
basicproperty -iterations 100000
********* Start testing of tst_binding *********
Config: Using QTest library 4.7.4, Qt 4.7.4
PASS : tst_binding::initTestCase()
RESULT : tst_binding::basicproperty():"value":
0.00294 msecs per iteration (total: 295, iterations: 100000)
RESULT : tst_binding::basicproperty():"value + 10":
0.00341 msecs per iteration (total: 342, iterations: 100000)
RESULT : tst_binding::basicproperty():"value + value + 10":
0.00617 msecs per iteration (total: 617, iterations: 100000)
RESULT : tst_binding::basicproperty():"myObject.value":
0.00323 msecs per iteration (total: 324, iterations: 100000)
RESULT : tst_binding::basicproperty():"myObject.value + 10":
0.00355 msecs per iteration (total: 355, iterations: 100000)
RESULT : tst_binding::basicproperty():"myObject.value + myObject.value + 10":
0.00362 msecs per iteration (total: 363, iterations: 100000)
PASS : tst_binding::basicproperty()
PASS : tst_binding::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped
********* Finished testing of tst_binding *********
It is a microbenchmark but give us at least some notion of where we
are now: around ~8x slower than Qt 4.7 was. Note that there are some
parts of the code that we didn't tune for v8 specifically, like String
handling for the QML caches.
Would be interesting to compare "bigger" pieces of JS, that wouldn't
be handled by the optimizer in real cases, too. Do you guys think
there are other, more relevant programs that we can test to compare?
Cheers,
PS: Jedrzej, be encouraged to do more benchmarking :-)
--
Caio Marcelo de Oliveira Filho
OpenBossa - INdT
_______________________________________________
Qt-script mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-script