Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- main()
- {
- new test = 1;
- new text[144];
- new tickCount = tickcount();
- if (test == 1)
- {}
- printf("Un if: %i ms", tickcount() - tickCount);
- tickCount = tickcount();
- for (new i = 0; i < 1000000; i++)
- {
- if (test == 1)
- {}
- }
- printf("1 milion if: %i ms", tickcount() - tickCount);
- tickCount = tickcount();
- format(text, sizeof text, "d-ul tau este %i", 0);
- SendClientMessage(0, -1, text);
- printf("1 mesaj formatat si trimis: %i ms", tickcount() - tickCount);
- tickCount = tickcount();
- for (new i = 0; i < 1000000; i++)
- {
- format(text, sizeof text, "d-ul tau este %i", 0);
- SendClientMessage(0, -1, text);
- }
- printf("1 milion mesaje formatate si trimise: %i ms", tickcount() - tickCount);
- tickCount = tickcount();
- if (test == 1)
- {
- format(text, sizeof text, "d-ul tau este %i", 0);
- SendClientMessage(0, -1, text);
- }
- else
- {
- format(text, sizeof text, "d-ul tau este %i", 0);
- SendClientMessage(0, -1, text);
- }
- printf("Un if cu mesaj formatat&trimis: %i ms", tickcount() - tickCount);
- tickCount = tickcount();
- for (new i = 0; i < 1000000; i++)
- {
- if (test == 1)
- {
- format(text, sizeof text, "d-ul tau este %i", 0);
- SendClientMessage(0, -1, text);
- }
- else
- {
- format(text, sizeof text, "d-ul tau este %i", 0);
- SendClientMessage(0, -1, text);
- }
- }
- printf("1 milion if/else cu mesaje formatate&trimise: %i ms", tickcount() - tickCount);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement