source: doc/papers/general/evaluation/cfa-bench.c @ 6dba9f99

aaron-thesisarm-ehcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerresolv-newwith_gc
Last change on this file since 6dba9f99 was 79d4186, checked in by Aaron Moss <a3moss@…>, 4 years ago

Update evaluation code for paper

  • Property mode set to 100644
File size: 679 bytes
Line 
1#include "bench.h"
2#include "cfa-stack.h"
3#include "cfa-pair.h"
4
5int main( int argc, char * argv[] ) {
6        int max = 0, val = 42;
7        stack( int ) si, ti;
8
9        REPEAT_TIMED( "push_int", N, push( si, val ); )
10        TIMED( "copy_int", ti = si; )
11        TIMED( "clear_int", clear( si ); )
12        REPEAT_TIMED( "pop_int", N, 
13                int x = pop( ti ); if ( x > max ) max = x; )
14
15        pair( _Bool, char ) max = { (_Bool)0 /***/, '\0' }, val = { (_Bool)1 /***/, 'a' };
16        stack( pair( _Bool, char ) ) sp, tp;
17
18        REPEAT_TIMED( "push_pair", N, push( sp, val ); )
19        TIMED( "copy_pair", tp = sp; )
20        TIMED( "clear_pair", clear( sp ); )
21        REPEAT_TIMED( "pop_pair", N,
22                pair(_Bool, char) x = pop( tp ); if ( x > max ) max = x; )
23}
Note: See TracBrowser for help on using the repository browser.