diff options
Diffstat (limited to 'benchmarks/auto/js/sum10k_fixed.qml')
-rw-r--r-- | benchmarks/auto/js/sum10k_fixed.qml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/benchmarks/auto/js/sum10k_fixed.qml b/benchmarks/auto/js/sum10k_fixed.qml new file mode 100644 index 0000000..b638a94 --- /dev/null +++ b/benchmarks/auto/js/sum10k_fixed.qml @@ -0,0 +1,20 @@ +import QtQuick 2.0 +import QmlBench 1.0 + +// Tests the creation of items with a non-recursive function binding +CreationBenchmark { + id: root; + count: 50; + staticCount: 1000; + delegate: Item { + x: sum(10000); + } + + function sum(n) { + var x = 0; + for (var i=0; i<n; ++i) + x = x + 1; + return x; + } +} + |