Commit c9d2e4f1 authored by Hans-Christian Ebke's avatar Hans-Christian Ebke
Browse files

Added another tiny benchmark.

parent 3ed7079c
Pipeline #53 passed with stage
......@@ -27,3 +27,18 @@ static void ASSEMBLE(BMPREFIX, Vec3f_add_compare)(benchmark::State& state) {
}
MYBENCHMARK (ASSEMBLE(BMPREFIX, Vec3f_add_compare));
static void ASSEMBLE(BMPREFIX, Vec3d_add_compare)(benchmark::State& state) {
OpenMesh::Vec3d v1(0, 0, 0);
OpenMesh::Vec3d v2(1000, 1000, 1000);
while (state.KeepRunning()) {
v1 += OpenMesh::Vec3d(1.1, 1.2, 1.3);
v2 -= OpenMesh::Vec3d(1.1, 1.2, 1.3);
if (v1 == v2) {
v1 -= v2;
v2 += v1;
}
}
}
MYBENCHMARK (ASSEMBLE(BMPREFIX, Vec3d_add_compare));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment