From f82cf14c97220dc181ede6c57ac3f0dbdd8f37f1 Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Fri, 27 Apr 2018 13:31:09 -0400 Subject: [PATCH] Adding stage speeds. --- main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 1cc6ae76..b7f1826e 100644 --- a/main.cpp +++ b/main.cpp @@ -631,11 +631,14 @@ int main(int argc, char * argv[]) { unsigned long total = cy1 + cy2 + cy3 ; printf("stage 1 instructions: %10lu cycles: %10lu (%.1f %%) ins/cycles: %.2f \n", cy1, cl1, 100. * cy1 / total, (double) cl1 / cy1); + printf(" stage 1 runs at %.1f cycles per input byte.\n", (double) cy1 / (iterations * p.second)); printf("stage 2 instructions: %10lu cycles: %10lu (%.1f %%) ins/cycles: %.2f \n", cy2, cl2, 100. * cy2 / total, (double) cl2 / cy2); + printf(" stage 2 runs at %.1f cycles per input byte.\n", (double) cy2 / (iterations * p.second)); printf("stage 3 instructions: %10lu cycles: %10lu (%.1f %%) ins/cycles: %.2f \n", cy3, cl3, 100. * cy3 / total, (double) cl3 / cy3); - printf(" %.1f cycles per input byte.\n", (double) total / (iterations * p.second)); + printf(" stage 3 runs at %.1f cycles per input byte.\n", (double) cy3 / (iterations * p.second)); + printf(" all stages: %.1f cycles per input byte.\n", (double) total / (iterations * p.second)); #endif // colorfuldisplay(pj, p.first); double min_result = *min_element(res.begin(), res.end());