Ignore:
Timestamp:
Mar 7, 2018, 5:09:18 PM (6 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
fb11446e
Parents:
b2e8841 (diff), 7b0dfa4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:/u/cforall/software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/papers/general/evaluation/cfa-bench.c

    rb2e8841 rf4abc58  
    1 #include <fstream>
    2 #include <stdlib>
    31#include "bench.h"
    42#include "cfa-stack.h"
    53#include "cfa-pair.h"
    6 #include "cfa-print.h"
    74
    85int main( int argc, char * argv[] ) {
    9         ofstream out = { "/dev/null" };
    106        int max = 0, val = 42;
    11         stack( int ) si, t;
     7        stack( int ) si, ti;
    128
    139        REPEAT_TIMED( "push_int", N, push( si, val ); )
    14         TIMED( "copy_int", t = si; )
     10        TIMED( "copy_int", ti = si; )
    1511        TIMED( "clear_int", clear( si ); )
    16         REPEAT_TIMED( "pop_int", N, int x = pop( t ); max = max( x, max ); )
    17         REPEAT_TIMED( "print_int", N/2, out | val | ':' | val | endl; )
     12        REPEAT_TIMED( "pop_int", N,
     13                int x = pop( ti ); if ( x > max ) max = x; )
    1814
    19         pair( _Bool, char ) max = { (_Bool)0, '\0' }, val = { (_Bool)1, 'a' };
    20         stack( pair( _Bool, char ) ) s, t;
     15        pair( _Bool, char ) max = { (_Bool)0 /***/, '\0' }, val = { (_Bool)1 /***/, 'a' };
     16        stack( pair( _Bool, char ) ) sp, tp;
    2117
    22         REPEAT_TIMED( "push_pair", N, push( s, val ); )
    23         TIMED( "copy_pair", t = s; )
    24         TIMED( "clear_pair", clear( s ); )
    25         REPEAT_TIMED( "pop_pair", N, pair(_Bool, char) x = pop( t ); max = max( x, max ); )
    26         REPEAT_TIMED( "print_pair", N/2, out | val | ':' | val | endl; )
     18        REPEAT_TIMED( "push_pair", N, push( sp, val ); )
     19        TIMED( "copy_pair", tp = sp; )
     20        TIMED( "clear_pair", clear( sp ); )
     21        REPEAT_TIMED( "pop_pair", N,
     22                pair(_Bool, char) x = pop( tp ); if ( x > max ) max = x; )
    2723}
Note: See TracChangeset for help on using the changeset viewer.