Advertisement
Guest User

Untitled

a guest
Dec 4th, 2013
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. print("=============================================");
  2. print("> Advanced Functions BetterFormat AddON Benchmark");
  3. print("---------------------------------------------");
  4. new total[2], Start, End, str[128];
  5. new text[16] = "Test";
  6. new int1 = 3;
  7. new int2 = 93;
  8. new Float:fl1 = 1.399993815;
  9.  
  10. for ( new l=0; l != 500; l ++ ) {
  11. Start= GetTickCount();
  12. for ( new it=0; it < 10000; it ++ ) {
  13. SendClientMessageX(0, -1, "Test: %s, %i, %d, %f", text, int1, int2, fl1);
  14. }
  15. End=GetTickCount();
  16. total[0] += End-Start;
  17.  
  18. Start= GetTickCount();
  19. for ( new it=0; it < 10000; it ++ ) {
  20. format(str, 128, "Test: %s, %i, %d, %f", text, int1, int2, fl1), SendClientMessage(0, -1, str);
  21. }
  22. End=GetTickCount();
  23. total[1] += End-Start;
  24. printf("%d%/100%",l/5);
  25. }
  26.  
  27. printf("> BetterFormat v0.1: %dms", total[0]);
  28. printf("> Format : %dms", total[1] );
  29. print("-------------------------");
  30. if ( total[1] - total[0] > 0 )
  31. printf("<> Betterformat is %dms Faster ;)", total[1] - total[0] );
  32. else
  33. printf("<> Betterformat is %dms Slower ;(", -(total[1] - total[0]) );
  34. print("=============================================");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement