Changeset 14a3dad2


Ignore:
Timestamp:
Mar 7, 2018, 1:45:25 PM (7 years ago)
Author:
Aaron Moss <a3moss@…>
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:
6dba9f99
Parents:
79d4186
Message:

Update code in CFA benchmark test listing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/papers/general/Paper.tex

    r79d4186 r14a3dad2  
    25492549\begin{cfa}[xleftmargin=3\parindentlnth,aboveskip=0pt,belowskip=0pt]
    25502550int main( int argc, char * argv[] ) {
    2551         ofstream out = { "cfa-out.txt" };
    25522551        int max = 0, val = 42;
    2553         stack( int ) s, t;
    2554 
    2555         REPEAT_TIMED( "push_int", N, push( s, val ); )
    2556         TIMED( "copy_int", t = s; )
    2557         TIMED( "clear_int", clear( s ); )
    2558         REPEAT_TIMED( "pop_int", N, int v = pop( t ); max = max( v, max ); )
    2559         REPEAT_TIMED( "print_int", N/2, out | val | ':' | val | endl; )
    2560 
    2561         pair( _Bool, char ) max = { false, '\0' }, val = { true, 'a' };
    2562         stack( pair( _Bool, char ) ) s, t;
    2563 
    2564         REPEAT_TIMED( "push_pair", N, push( s, val ); )
    2565         TIMED( "copy_pair", t = s; )
    2566         TIMED( "clear_pair", clear( s ); )
    2567         REPEAT_TIMED( "pop_pair", N, pair(_Bool, char) v = pop( t ); max = max( v, max ); )
    2568         REPEAT_TIMED( "print_pair", N/2, out | val | ':' | val | endl; )
     2552        stack( int ) si, ti;
     2553
     2554        REPEAT_TIMED( "push_int", N, push( si, val ); )
     2555        TIMED( "copy_int", ti = si; )
     2556        TIMED( "clear_int", clear( si ); )
     2557        REPEAT_TIMED( "pop_int", N,
     2558                int x = pop( ti ); if ( x > max ) max = x; )
     2559
     2560        pair( _Bool, char ) max = { (_Bool)0, '\0' }, val = { (_Bool)1, 'a' };
     2561        stack( pair( _Bool, char ) ) sp, tp;
     2562
     2563        REPEAT_TIMED( "push_pair", N, push( sp, val ); )
     2564        TIMED( "copy_pair", tp = sp; )
     2565        TIMED( "clear_pair", clear( sp ); )
     2566        REPEAT_TIMED( "pop_pair", N,
     2567                pair(_Bool, char) x = pop( tp ); if ( x > max ) max = x; )
    25692568}
    25702569\end{cfa}
Note: See TracChangeset for help on using the changeset viewer.