Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <windows.h>
- #include <iostream>
- #include <time.h>
- typedef long long Real;
- int main()
- {
- Real c, x;
- //--//
- const unsigned long long iterCount = pow(2, 29);
- x = 0;
- c = clock();
- std::cout << c << std::endl;
- for(Real i = 0; i<iterCount; ++i)
- {
- if(i > 0)
- { ++x; }
- }
- std::cout << clock() - c << " : " << x << std::endl;
- x = 0;
- c = clock();
- std::cout << c << std::endl;
- for(Real i = 0; i<iterCount; ++i)
- {
- if(i < 0)
- { ++x; }
- }
- std::cout << clock() - c << " : " << x << std::endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment