source: benchmark/ctxswitch/cfa_cor.cfa@ 2ac218d

ADT ast-experimental enum forall-pointer-decay jacob/cs343-translation new-ast-unique-expr pthread-emulation qualifiedEnum
Last change on this file since 2ac218d was dfda49f, checked in by Peter A. Buhr <pabuhr@…>, 6 years ago

update benchmarks with new generator implementation

  • Property mode set to 100644
File size: 354 bytes
RevLine 
[73abe95]1#include <kernel.hfa>
2#include <thread.hfa>
[de90452]3
[dfda49f]4#include "../bench.h"
[de90452]5
[dfda49f]6coroutine C {};
[2316525]7void main( __attribute__((unused)) C & ) {
[dfda49f]8 for () {
[427854b]9 suspend;
[de90452]10 }
11}
[b4107c8]12int main( int argc, char * argv[] ) {
[dfda49f]13 C c;
[b4107c8]14 BENCH_START()
[034165a]15 BENCH(
[2316525]16 for ( times ) {
17 resume( c );
[b7170a64]18 },
[034165a]19 result
20 )
[b4107c8]21 printf( "%g\n", result );
[dc33b5b]22}
[b4107c8]23
24// Local Variables: //
25// tab-width: 4 //
26// End: //
Note: See TracBrowser for help on using the repository browser.