Ignore:
Timestamp:
Apr 15, 2017, 7:09:59 PM (4 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
c57d1935
Parents:
308880c
Message:

Minor cleanup, also filled in benchmark source appendix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/generic_types/evaluation/cpp-bench.cpp

    r308880c ra381b46  
    88int main(int argc, char** argv) {
    99        std::ofstream out{"cpp-out.txt"};
     10        int max = 0;
    1011        stack<int> s, t;
    11         int max = 0;
    12         REPEAT_TIMED( "push_int", s.push( _i ); )
     12       
     13        REPEAT_TIMED( "push_int", s.push( int{_i} ); )
    1314        TIMED( "copy_int", t = s; )
    1415        TIMED( "clear_int", s.clear(); )
     
    1718        REPEAT_N_TIMED( "print_int", N/2, print( out, _i, ":", _i, "\n" ); )
    1819
     20        std::pair<bool, char> max1 = { false, '\0' };
    1921        stack<std::pair<bool, char>> s1, t1;
    20         std::pair<bool, char> max1 = { false, '\0' };
     22       
    2123        REPEAT_TIMED( "push_bool_char", s1.push( std::pair<bool, char>{ _i & 0x1, _i & 0x7F } ); )
    2224        TIMED( "copy_bool_char", t1 = s1; )
Note: See TracChangeset for help on using the changeset viewer.