Changeset 3fb7f5e for doc/generic_types/evaluation/cpp-bench.cpp
- Timestamp:
- Apr 14, 2017, 4:51:13 PM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/generic_types/evaluation/cpp-bench.cpp
r3895b8b5 r3fb7f5e 8 8 9 9 int main(int argc, char** argv) { 10 std::ofstream out{"cpp-out.txt"}; 10 11 srand(20171025); 11 12 … … 28 29 max = std::max( max, t.pop() ); 29 30 ) 31 print( out, max, "\n" ); 32 33 REPEAT_N_TIMED( "print_int", N/2, 34 print( out, rand(), ":", rand(), "\n" ); 35 ) 30 36 31 37 stack<std::pair<bool, char>> s2; … … 47 53 max2 = std::max( max2, t2.pop() ); 48 54 ) 55 print( out, max2, "\n" ); 49 56 50 std::ofstream out{"cpp-out.txt"}; 51 REPEAT_TIMED( "print_int", 52 print( out, rand(), ":", rand(), "\n" ); 53 ) 54 55 REPEAT_TIMED( "print_pair", 57 REPEAT_N_TIMED( "print_pair", N/2, 56 58 print( out, std::pair<bool, char>{ rand() & 0x1, rand() & 0x7F }, ":", 57 59 std::pair<bool, char>{ rand() & 0x1, rand() & 0x7F }, "\n" );
Note: See TracChangeset
for help on using the changeset viewer.