Ignore:
Timestamp:
Mar 10, 2020, 2:22:13 PM (5 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
28c4f74
Parents:
ff489bf
Message:

update benchmarks with new generator implementation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/ctxswitch/cfa_gen.cfa

    rff489bf rdfda49f  
    11#include "../bench.h"
    22
    3 typedef struct {
    4         void * next;
    5 } C;
    6 
    7 void comain( C * c ) {
    8         if ( __builtin_expect(c->next != 0, 1) ) goto *(c->next);
    9         c->next = &&s1;
     3generator G {};
     4void main( G & ) {
    105        for () {
    11                 return;
    12           s1: ;
     6                suspend;
    137        }
    148}
    159
    1610int main( int argc, char * argv[] ) {
     11        G g;
    1712        BENCH_START()
    18         C c = { 0 };
    1913        BENCH(
    2014                for ( times ) {
    21                         comain( &c );
     15                        resume( g );
    2216                },
    2317                result
Note: See TracChangeset for help on using the changeset viewer.