diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-01-08 15:14:44 +1000 |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-01-08 15:14:44 +1000 |
commit | 7cd2c43e41e204f5662a51c72b31e0606b71def3 (patch) | |
tree | 7405e9245dc66d3da2497f1afc5e500c440cee01 /tests/benchmarks/declarative/script/data/slot_complex.qml | |
parent | 7abc7b839223eaf05006fe35dceec690fee5ce3d (diff) |
QML dynamic function benchmark
Diffstat (limited to 'tests/benchmarks/declarative/script/data/slot_complex.qml')
-rw-r--r-- | tests/benchmarks/declarative/script/data/slot_complex.qml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/benchmarks/declarative/script/data/slot_complex.qml b/tests/benchmarks/declarative/script/data/slot_complex.qml new file mode 100644 index 0000000000..d71120dff1 --- /dev/null +++ b/tests/benchmarks/declarative/script/data/slot_complex.qml @@ -0,0 +1,16 @@ +import Qt.test 1.0 + +TestObject { + function myCustomFunction(b) { + var n = b; + var a = 1; + while (n > 0) { + a = a * n; + n--; + } + return a; + } + + onMySignal: { for (var ii = 0; ii < 10000; ++ii) { myCustomFunction(10); } } +} + |