Ignore:
Timestamp:
Jan 7, 2020, 3:50:56 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:
580c11b
Parents:
846c026
Message:

update existing benchmarks for changes to bench.h, add new benchmarks in new programming languages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/ctxswitch/upp_cor.cc

    r846c026 rb4107c8  
    44
    55_Coroutine GreatSuspender {
    6 public:
    7         GreatSuspender() {
    8                 resume();
    9         }
    10 
    11         void do_resume() {
    12                 resume();
    13         }
    14 private:
    156        void main() {
    167                while( true ) {
     
    189                }
    1910        }
     11  public:
     12        void do_resume() {
     13                resume();
     14        }
    2015};
    21 
    22 int main(int argc, char* argv[]) {
     16int main( int argc, char * argv[] ) {
     17        BENCH_START()
    2318        GreatSuspender s;
    24 
    2519        BENCH(
    26                 for (size_t i = 0; i < n; i++) {
     20                for (size_t i = 0; i < times; i++) {
    2721                        s.do_resume();
    2822                },
    2923                result
    3024        )
     25        printf( "%g\n", result );
     26}
    3127
    32         printf("%g\n", result);
    33 }
     28// Local Variables: //
     29// tab-width: 4 //
     30// End: //
Note: See TracChangeset for help on using the changeset viewer.