aboutsummaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/qml/script/data/global.js
blob: 8dca9d74c4e5c82e38e090da6c0b567f6607cb9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

var incVar = 1;
var total;

function doSomething() {
    for (var i = 0; i < 10000; ++i)
        Math.sin(90);
}

function doIncrement() {
    total = 0;
    for (var i = 0; i < 100000; ++i)
        total += incVar;
}