source: benchmark/ctxswitch/cfa_gen.cfa@ 8c9da33

ADT arm-eh ast-experimental enum forall-pointer-decay jacob/cs343-translation jenkins-sandbox new-ast new-ast-unique-expr pthread-emulation qualifiedEnum
Last change on this file since 8c9da33 was 2316525, checked in by Peter A. Buhr <pabuhr@…>, 6 years ago

update benchmarks for concurrency paper

  • Property mode set to 100644
File size: 404 bytes
Line 
1#include "../bench.h"
2
3typedef struct {
4 void * next;
5} C;
6
7void comain( C * c ) {
8 if ( __builtin_expect(c->next != 0, 1) ) goto *(c->next);
9 c->next = &&s1;
10 for () {
11 return;
12 s1: ;
13 }
14}
15
16int main( int argc, char * argv[] ) {
17 BENCH_START()
18 C c = { 0 };
19 BENCH(
20 for ( times ) {
21 comain( &c );
22 },
23 result
24 )
25 printf( "%g\n", result );
26}
27
28// Local Variables: //
29// tab-width: 4 //
30// End: //
Note: See TracBrowser for help on using the repository browser.