aboutsummaryrefslogtreecommitdiffstats
path: root/benchmarks/auto/js/sum10k.qml
blob: 0667945dd5fc01cf694358057a4b0fa8531977fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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 + x;
        return x;
    }
}