source: benchmark/ctxswitch/cfa_gen.cfa @ 96f5b30

ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since 96f5b30 was b4107c8, checked in by Peter A. Buhr <pabuhr@…>, 5 years ago

update existing benchmarks for changes to bench.h, add new benchmarks in new programming languages

  • Property mode set to 100644
File size: 458 bytes
Line 
1#include "../bench.h"
2
3typedef struct {
4        void * next;
5} GreatSuspender;
6
7void comain( GreatSuspender * this ) {
8        if ( __builtin_expect(this->next != 0, 1) ) goto *(this->next);
9        this->next = &&s1;
10        for () {
11                return;
12          s1: ;
13        }
14}
15
16int main( int argc, char * argv[] ) {
17        BENCH_START()
18        GreatSuspender s = { 0 };
19        BENCH(
20                for ( i; times ) {
21                        comain( &s );
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.