Ignore:
Timestamp:
Apr 14, 2017, 4:51:13 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:
1504536, e3de500
Parents:
3895b8b5
Message:

Update benchmarks, cleanup edits to the evaluation section

File:
1 edited

Legend:

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

    r3895b8b5 r3fb7f5e  
    88
    99int main(int argc, char** argv) {
     10        std::ofstream out{"cpp-vout.txt"};
    1011        srand(20171025);
    1112
     
    2627        integer max;
    2728        REPEAT_TIMED( "pop_int",
    28                 max = std::max( max, t.pop()->as<integer>() );
     29                max = std::max( max, t.pop()->as<integer>() ); /***/
     30        )
     31        print( out, max, c_string{"\n"} );
     32
     33        REPEAT_N_TIMED( "print_int", N/2,
     34                print( out, integer{rand()}, c_string{":"}, integer{rand()}, c_string{"\n"} );
    2935        )
    3036
     
    4753                std::make_unique<character>('\0') );
    4854        REPEAT_TIMED( "pop_bool_char",
    49                 std::unique_ptr<pair> x = as_ptr<pair>( t2.pop() );
     55                std::unique_ptr<pair> x = as_ptr<pair>( t2.pop() ); /***/
    5056                if ( *x > *max2 ) { max2 = std::move(x); }
    5157        )
     58        print( out, *max2, c_string{"\n"} );
    5259
    53         std::ofstream out{"cpp-vout.txt"};
    54         REPEAT_TIMED( "print_int",
    55                 print( out, integer{rand()}, c_string{":"}, integer{rand()}, c_string{"\n"} );
    56         )
    57 
    58         REPEAT_TIMED( "print_pair",
     60        REPEAT_N_TIMED( "print_pair", N/2,
    5961                print( out, pair{ std::make_unique<boolean>( rand() & 0x1 ),
    6062                        std::make_unique<character>( rand() & 0x7F ) }, c_string{":"},
Note: See TracChangeset for help on using the changeset viewer.