source:
benchmark/ctxswitch/cfa_gen.cfa@
3a513d89
| Last change on this file since 3a513d89 was dfda49f, checked in by , 6 years ago | |
|---|---|
|
|
| File size: 286 bytes | |
| Line | |
|---|---|
| 1 | #include "../bench.h" |
| 2 | |
| 3 | generator G {}; |
| 4 | void main( G & ) { |
| 5 | for () { |
| 6 | suspend; |
| 7 | } |
| 8 | } |
| 9 | |
| 10 | int main( int argc, char * argv[] ) { |
| 11 | G g; |
| 12 | BENCH_START() |
| 13 | BENCH( |
| 14 | for ( times ) { |
| 15 | resume( g ); |
| 16 | }, |
| 17 | result |
| 18 | ) |
| 19 | printf( "%g\n", result ); |
| 20 | } |
| 21 | |
| 22 | // Local Variables: // |
| 23 | // tab-width: 4 // |
| 24 | // End: // |
Note:
See TracBrowser
for help on using the repository browser.