ultimatepp/uppdev/benchsin/benchsin.cpp
cxl f9554adb2d Stroker finished!
git-svn-id: svn://ultimatepp.org/upp/trunk@839 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2009-02-06 18:31:20 +00:00

40 lines
628 B
C++

#include <Core/Core.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
double h = 0;
{
RTIMING("sin");
for(double x = 0; x < 1000000; x += 0.1)
h += sin(x);
}
{
RTIMING("asin");
for(double x = 0; x < 1000000; x += 0.1)
h += asin(x);
}
{
RTIMING("acos");
for(double x = 0; x < 1000000; x += 0.1)
h += acos(x);
}
{
RTIMING("add");
for(double x = 0; x < 1000000; x += 0.1)
h += x;
}
{
RTIMING("mul");
for(double x = 0; x < 1000000; x += 0.1)
h *= x;
}
{
RTIMING("sqrt");
for(double x = 0; x < 1000000; x += 0.1)
h += sqrt(x);
}
RDUMP(h);
}