chiark / gitweb /
@@@ adjust bench timings
authorMark Wooding <mdw@distorted.org.uk>
Thu, 11 May 2023 01:55:25 +0000 (02:55 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 11 May 2023 01:55:25 +0000 (02:55 +0100)
test/bench.c

index 17ed4ed833d6ad9d254a0bc5133053f9f7870642..df8c4efd8ad20d9bb99b5be583ade918797de5b5 100644 (file)
@@ -476,6 +476,10 @@ int bench_measure(struct bench_timing *t_out, struct bench_state *b,
     if (t_out->t >= 0.72*b->target_s) break;
     n *= 1.44*b->target_s/t_out->t;
   }
+  t_out->t -= n*b->clk.m + b->clk.c;
+  if (t_out->f&BTF_CYOK) t_out->cy -= n*b->cy.m + b->cy.c;
+  if (!(t_out->f&BTF_CYOK)) debug("  adjusted t' = %12g", t_out->t);
+  else debug("  adjusted t = %12g, cy = %10.0f", t_out->t, t_out->cy);
   if (!(t_out->f&BTF_CYOK))
     debug("  %g s per op; %g ops/s", t_out->t/n, n/t_out->t);
   else