iJayce

Speed test macro.

Feb 16th, 2016
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.35 KB | None | 0 0
  1. // speed test macro
  2. new _I,_TiCkCoUn_T;
  3. #define START_SPEED_TEST(%0)  {_I=0,_TiCkCoUn_T=GetTickCount();while(_I<%0){_I++;
  4. #define FINISH_SPEED_TEST(%0) }printf("Executing `%s` %d times took: %d ms",%0, _I,GetTickCount()-_TiCkCoUn_T);}
  5. // example
  6.     new test2[15000];
  7.     START_SPEED_TEST(10000)
  8.         test2[_I] = 1;
  9.     FINISH_SPEED_TEST("Array Direct Assign")
Add Comment
Please, Sign In to add comment