Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- myArray = [];
- for "_i" from 0 to 1000000 do {
- myArray set [count myArray, _i];
- };
- hint "DONE POPULATING ARRAY";
- myFunction = {
- [] spawn {
- _startTime = diag_tickTime;
- /*
- {
- _tmp = _x;
- } forEach myArray;
- */
- /*
- {
- _tmp = _x;
- } count myArray;
- */
- for "_i" from 0 to (count myArray - 1) do {
- _tmp = myArray select _i;
- };
- _diff = diag_tickTime - _startTime;
- diag_log (str (_diff));
- }
- }
- /*
- unscheduled (blocking engine) scheduled (not blocking engine)
- forEach 1.66449 5.379515
- count 1.2985075 4.25299
- for 1.95398 6.209015
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement