Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "math.h"
- #include "windows.h"
- int _tmain(int argc, _TCHAR* argv[])
- {
- DWORD start = timeGetTime();
- int i;
- for(i=0;i<900000000;i++)
- {
- int j = i / 2;
- }
- DWORD end = timeGetTime();
- printf("normal time: %f\n",(end - start)*0.001f);
- start = timeGetTime();
- for(i=0;i<900000000;i++)
- {
- int j = i >> 1;
- }
- end = timeGetTime();
- printf("shift time: %f",(end - start)*0.001f);
- getchar();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement