Changeset 69e398f
- Timestamp:
- Jan 22, 2020, 10:07:35 PM (5 years ago)
- 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
- Location:
- benchmark/creation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/creation/cfa_cor.cfa
r9d6317f r69e398f 1 #include <stdio.h> 2 #include <coroutine.hfa> 3 1 4 #include "bench.h" 2 5 3 typedef struct { 4 void * next; 5 } C; 6 coroutine MyCoroutine {}; 7 void ?{}( MyCoroutine & this ) { 8 #ifdef EAGER 9 resume( this ); 10 #endif 11 } 12 void main( MyCoroutine & ) {} 6 13 7 14 int main( int argc, char * argv[] ) { … … 9 16 BENCH( 10 17 for ( times ) { 11 Cc;18 MyCoroutine c; 12 19 }, 13 20 result -
benchmark/creation/cfa_gen.cfa
r9d6317f r69e398f 1 #include <stdio.h>2 #include <coroutine.hfa>3 4 1 #include "bench.h" 5 2 6 coroutine MyCoroutine {}; 7 void ?{}( MyCoroutine & this ) { 8 #ifdef EAGER 9 resume( this ); 10 #endif 11 } 12 void main( MyCoroutine & ) {} 3 struct C { 4 volatile int restart; // ensure compiler does not optimize away all the code 5 }; 6 void ?{}( C & c ) { c.restart = 0; } 7 void main( C & ) {} 13 8 14 9 int main( int argc, char * argv[] ) { … … 16 11 BENCH( 17 12 for ( times ) { 18 MyCoroutinec;13 C c; 19 14 }, 20 15 result
Note: See TracChangeset
for help on using the changeset viewer.