Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Test 1:
- new time = tickcount();
- new res;
- for(new i = 0; i < 10000000; i++)
- {
- res = functionA();
- }
- printf("A time: %d", tickcount() - time);
- time = tickcount();
- for(new i = 0; i < 10000000; i++)
- {
- functionB(res);
- }
- printf("B time: %d", tickcount() - time);
- // Test 2:
- new time = tickcount();
- for(new i = 0; i < 10000000; i++)
- {
- new res = functionA();
- }
- printf("A time: %d", tickcount() - time);
- time = tickcount();
- for(new i = 0; i < 10000000; i++)
- {
- new res;
- functionB(res);
- }
- printf("B time: %d", tickcount() - time);
- // Test 3:
- for(new i = 0; i < 10000000; i++)
- {
- new res;
- res = functionA();
- }
- printf("A time: %d", tickcount() - time);
- time = tickcount();
- for(new i = 0; i < 10000000; i++)
- {
- new res;
- functionB(res);
- }
- printf("B time: %d", tickcount() - time);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement