Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("=============================================");
- print("> Advanced Functions BetterFormat AddON Benchmark");
- print("---------------------------------------------");
- new total[2], Start, End, str[128];
- new text[16] = "Test";
- new int1 = 3;
- new int2 = 93;
- new Float:fl1 = 1.399993815;
- for ( new l=0; l != 500; l ++ ) {
- Start= GetTickCount();
- for ( new it=0; it < 10000; it ++ ) {
- SendClientMessageX(0, -1, "Test: %s, %i, %d, %f", text, int1, int2, fl1);
- }
- End=GetTickCount();
- total[0] += End-Start;
- Start= GetTickCount();
- for ( new it=0; it < 10000; it ++ ) {
- format(str, 128, "Test: %s, %i, %d, %f", text, int1, int2, fl1), SendClientMessage(0, -1, str);
- }
- End=GetTickCount();
- total[1] += End-Start;
- printf("%d%/100%",l/5);
- }
- printf("> BetterFormat v0.1: %dms", total[0]);
- printf("> Format : %dms", total[1] );
- print("-------------------------");
- if ( total[1] - total[0] > 0 )
- printf("<> Betterformat is %dms Faster ;)", total[1] - total[0] );
- else
- printf("<> Betterformat is %dms Slower ;(", -(total[1] - total[0]) );
- print("=============================================");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement