Ignore:
Timestamp:
Jan 22, 2020, 10:07:35 PM (4 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
8b16980
Parents:
9d6317f
Message:

interchange CFA coroutine and generator creation benchmarks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/creation/cfa_gen.cfa

    r9d6317f r69e398f  
    1 #include <stdio.h>
    2 #include <coroutine.hfa>
    3 
    41#include "bench.h"
    52
    6 coroutine MyCoroutine {};
    7 void ?{}( MyCoroutine & this ) {
    8 #ifdef EAGER
    9         resume( this );
    10 #endif
    11 }
    12 void main( MyCoroutine & ) {}
     3struct C {
     4        volatile int restart; // ensure compiler does not optimize away all the code
     5};
     6void ?{}( C & c ) { c.restart = 0; }
     7void main( C & ) {}
    138
    149int main( int argc, char * argv[] ) {
     
    1611        BENCH(
    1712                for ( times ) {
    18                         MyCoroutine c;
     13                         C c;
    1914                },
    2015                result
Note: See TracChangeset for help on using the changeset viewer.