SHARE
TWEET

Untitled

a guest Sep 13th, 2017 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "math.h"
  2. #include "windows.h"
  3.  
  4. int _tmain(int argc, _TCHAR* argv[])
  5. {  
  6.     DWORD start = timeGetTime();
  7.     int i;
  8.     for(i=0;i<50000000;i++)
  9.     {
  10.         float j = i / 100;
  11.     }
  12.     DWORD end = timeGetTime();
  13.     printf("normal time: %f\n",(end - start)*0.001f);
  14.     start = timeGetTime();
  15.     for(i=0;i<50000000;i++)
  16.     {
  17.         float j = i * 0.01f;
  18.     }
  19.     end = timeGetTime();
  20.     printf("multi time: %f",(end - start)*0.001f);
  21.     getchar();
  22.     return 0;
  23. }
RAW Paste Data
Top