Advertisement
Guest User

Speedtests

a guest
Jun 5th, 2011
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.83 KB | None | 0 0
  1. // Test 1:
  2. new time = tickcount();
  3. new res;
  4. for(new i = 0; i < 10000000; i++)
  5. {
  6.     res = functionA();
  7. }
  8. printf("A time: %d", tickcount() - time);
  9.  
  10. time = tickcount();
  11. for(new i = 0; i < 10000000; i++)
  12. {
  13.     functionB(res);
  14. }
  15. printf("B time: %d", tickcount() - time);
  16.  
  17. // Test 2:
  18. new time = tickcount();
  19. for(new i = 0; i < 10000000; i++)
  20. {
  21.     new res = functionA();
  22. }
  23. printf("A time: %d", tickcount() - time);
  24.    
  25. time = tickcount();
  26. for(new i = 0; i < 10000000; i++)
  27. {
  28.     new res;
  29.     functionB(res);
  30. }
  31. printf("B time: %d", tickcount() - time);
  32.  
  33. // Test 3:
  34. for(new i = 0; i < 10000000; i++)
  35. {
  36.     new res;
  37.     res = functionA();
  38. }
  39. printf("A time: %d", tickcount() - time);
  40.    
  41. time = tickcount();
  42. for(new i = 0; i < 10000000; i++)
  43. {
  44.     new res;
  45.     functionB(res);
  46. }
  47. printf("B time: %d", tickcount() - time);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement