Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stock j_GetPlayerPoolSize() return 5000000;
- #define GetPlayerPoolSize j_GetPlayerPoolSize
- stock GetSpeedResults()
- {
- new a, b = GetPlayerPoolSize(), c, t = GetTickCount();
- for(a = 0; a < b + 1; a++) c++;
- printf("1 ciklas prasuktas per: %d MS", GetTickCount() - t);
- t = GetTickCount();
- for(new i, j = GetPlayerPoolSize (); i <= j; i++) c++;
- printf("2 ciklas prasuktas per: %d MS", GetTickCount() - t);
- a = 0;
- t = GetTickCount();
- for(a = b; a > -1; a--) c++;
- printf("3 ciklas prasuktas per: %d MS", GetTickCount() - t);
- }
- main()
- {
- for(new c; c < 3; c++) GetSpeedResults();
- }
- /*
- Rezultatai:
- 1 ciklas prasuktas per: 154 MS
- 2 ciklas prasuktas per: 133 MS
- 3 ciklas prasuktas per: 126 MS
- 1 ciklas prasuktas per: 146 MS
- 2 ciklas prasuktas per: 132 MS
- 3 ciklas prasuktas per: 125 MS
- 1 ciklas prasuktas per: 145 MS
- 2 ciklas prasuktas per: 132 MS
- 3 ciklas prasuktas per: 125 MS
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement