#include <iostream>#include <stdlib.h>#include <windows.h>#include <math.h>int main(){ using namespace std; int time, dt; float f; float a = 31.142; time = GetTickCount(); for (register int i = 0; i < 10000000; ++ i) { } dt = GetTickCount() - time; cout << "None: " << (float) dt / 10000 << endl; time = GetTickCount(); for (register int i = 0; i < 10000000; ++ i) { f = sin(a); } dt = GetTickCount() - time; cout << "Sin: " << (float) dt / 10000 << endl; time = GetTickCount(); for (register int i = 0; i < 10000000; ++ i) { f = cos(a); } dt = GetTickCount() - time; cout << "Cos: " << (float) dt / 10000 << endl; system("pause");}
And then the linky:
clicky