Changeset 82c367d for doc/papers/general/evaluation/cfa-bench.c
- Timestamp:
- Mar 3, 2018, 7:54:50 AM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 0a2168f
- Parents:
- 000ff2c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/papers/general/evaluation/cfa-bench.c
r000ff2c r82c367d 1 1 #include <fstream> 2 2 #include <stdlib> 3 #include <stdbool.h> 3 4 #include "bench.h" 4 5 #include "cfa-stack.h" … … 9 10 ofstream out = { "/dev/null" }; 10 11 int max = 0, val = 42; 11 stack( int ) s i, t;12 stack( int ) s, t; 12 13 13 REPEAT_TIMED( "push_int", N, push( s i, val ); )14 TIMED( "copy_int", t = s i; )15 TIMED( "clear_int", clear( s i); )14 REPEAT_TIMED( "push_int", N, push( s, val ); ) 15 TIMED( "copy_int", t = s; ) 16 TIMED( "clear_int", clear( s ); ) 16 17 REPEAT_TIMED( "pop_int", N, int x = pop( t ); max = max( x, max ); ) 17 18 REPEAT_TIMED( "print_int", N/2, out | val | ':' | val | endl; ) 18 19 19 pair( _Bool, char ) max = { (_Bool) 0, '\0' }, val = { (_Bool)1, 'a' };20 pair( _Bool, char ) max = { (_Bool)false, '\0' }, val = { (_Bool)true, 'a' }; 20 21 stack( pair( _Bool, char ) ) s, t; 21 22
Note: See TracChangeset
for help on using the changeset viewer.