Skip to content

@m42a /bench.cpp
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
#include "foo.h"
void bench()
{
Radians rad(PI);
Radians tmp(0);
for (int i=0; i<100000000; ++i)
{
tmp=mul(rad);
rad=div(tmp);
}
}
void bench_ref()
{
Radians rad(PI);
Radians tmp(0);
for (int i=0; i<100000000; ++i)
{
tmp=mul_ref(rad);
rad=div_ref(tmp);
}
}
#include "foo.h"
Radians mul(Radians r)
{
return r*2;
}
Radians div(Radians r)
{
return r/2;
}
Radians mul_ref(const Radians &r)
{
return r*2;
}
Radians div_ref(const Radians &r)
{
return r/2;
}
#include "degrad.h"
Radians mul(Radians);
Radians div(Radians);
Radians mul_ref(const Radians);
Radians div_ref(const Radians);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.