From b0e471b332fbc8607eee738677e4d5dd75bf1777 Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Fri, 12 Jul 2019 12:13:42 +0200 Subject: (#143) much simpler example to measure how our measures affect performance --- test/monniaux/sandbox/example.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/monniaux/sandbox/example.c b/test/monniaux/sandbox/example.c index dccb576e..ce35360a 100644 --- a/test/monniaux/sandbox/example.c +++ b/test/monniaux/sandbox/example.c @@ -2,6 +2,7 @@ #include "f.h" #include "../cycles.h" +#if 0 int main(void){ cycle_count_config(); @@ -20,3 +21,20 @@ int main(void){ TIMEPRINT(1) return 0; } +#endif + +int main(void){ + cycle_count_config(); + + TIMEINIT + int a = 42; + int b = 21; + int c = 42+b; + TIMESTOP(0) + int d = a + b; + int e = a + b + c + d; + TIMESTOP(1) + + TIMEPRINT(1) + return e; +} -- cgit