diff options
author | Cyril SIX <cyril.six@kalray.eu> | 2019-07-12 12:13:42 +0200 |
---|---|---|
committer | Cyril SIX <cyril.six@kalray.eu> | 2019-07-12 12:13:42 +0200 |
commit | b0e471b332fbc8607eee738677e4d5dd75bf1777 (patch) | |
tree | f7088ebf91e0db4aa0b9a71d3ca73dbde233738e /test/monniaux/sandbox | |
parent | 4f6fd68084b4d3a7544e166b2c24524464efb626 (diff) | |
download | compcert-kvx-b0e471b332fbc8607eee738677e4d5dd75bf1777.tar.gz compcert-kvx-b0e471b332fbc8607eee738677e4d5dd75bf1777.zip |
(#143) much simpler example to measure how our measures affect performance
Diffstat (limited to 'test/monniaux/sandbox')
-rw-r--r-- | test/monniaux/sandbox/example.c | 18 |
1 files changed, 18 insertions, 0 deletions
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; +} |