Browse Source

Perf test for constant load

add-comment-stripped-dist-source
Sami Vaarala 9 years ago
parent
commit
e9d9cc4ad5
  1. 116
      tests/perf/test-const-load.js

116
tests/perf/test-const-load.js

@ -0,0 +1,116 @@
/*
* Loading constant to register.
*/
function test() {
var i;
var t;
for (i = 0; i < 1e7; i++) {
t = 123.0;
t = 123.1;
t = 123.2;
t = 123.3;
t = 123.4;
t = 123.5;
t = 123.6;
t = 123.7;
t = 123.8;
t = 123.9;
t = 123.0;
t = 123.1;
t = 123.2;
t = 123.3;
t = 123.4;
t = 123.5;
t = 123.6;
t = 123.7;
t = 123.8;
t = 123.9;
t = 123.0;
t = 123.1;
t = 123.2;
t = 123.3;
t = 123.4;
t = 123.5;
t = 123.6;
t = 123.7;
t = 123.8;
t = 123.9;
t = 123.0;
t = 123.1;
t = 123.2;
t = 123.3;
t = 123.4;
t = 123.5;
t = 123.6;
t = 123.7;
t = 123.8;
t = 123.9;
t = 123.0;
t = 123.1;
t = 123.2;
t = 123.3;
t = 123.4;
t = 123.5;
t = 123.6;
t = 123.7;
t = 123.8;
t = 123.9;
t = 123.0;
t = 123.1;
t = 123.2;
t = 123.3;
t = 123.4;
t = 123.5;
t = 123.6;
t = 123.7;
t = 123.8;
t = 123.9;
t = 123.0;
t = 123.1;
t = 123.2;
t = 123.3;
t = 123.4;
t = 123.5;
t = 123.6;
t = 123.7;
t = 123.8;
t = 123.9;
t = 123.0;
t = 123.1;
t = 123.2;
t = 123.3;
t = 123.4;
t = 123.5;
t = 123.6;
t = 123.7;
t = 123.8;
t = 123.9;
t = 123.0;
t = 123.1;
t = 123.2;
t = 123.3;
t = 123.4;
t = 123.5;
t = 123.6;
t = 123.7;
t = 123.8;
t = 123.9;
}
}
try {
test();
} catch (e) {
print(e.stack || e);
throw e;
}
Loading…
Cancel
Save