-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjs.js
37 lines (32 loc) · 824 Bytes
/
js.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
var s_date_time = new Date( );
// allowing to use js24 (spidermonkey) OR nodejs as runtime
if ('undefined' == typeof print)
print = function(v)
{
process.stdout.write( v + "\n" );
};
var iloops = 15000;
try
{
if (scriptArgs[0]) iloops = parseInt( scriptArgs[ 0 ], 10 );
}
catch( exc )
{
if (process.argv[2]) iloops = parseInt( process.argv[ 2 ], 10 );
}
var i_counter = 0;
for (var i_loop1 = 0; i_loop1 < 10; i_loop1++)
{
for (var i_loop2 = 0; i_loop2 < iloops; i_loop2++)
{
for (var i_loop3 = 0; i_loop3 < iloops; i_loop3++)
{
i_counter++;
if (i_counter > 50) { i_counter = 0; }
}
}
}
var s_date_time_end = new Date( );
print( ' Result: ' + i_counter + ' ' +
+ (s_date_time_end.getTime()-s_date_time.getTime())/1000
+ ' seconds' );