Changeset a381b46 for doc/generic_types/evaluation/cpp-bench.cpp
- Timestamp:
- Apr 15, 2017, 7:09:59 PM (7 years ago)
- 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:
- c57d1935
- Parents:
- 308880c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/generic_types/evaluation/cpp-bench.cpp
r308880c ra381b46 8 8 int main(int argc, char** argv) { 9 9 std::ofstream out{"cpp-out.txt"}; 10 int max = 0; 10 11 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} ); ) 13 14 TIMED( "copy_int", t = s; ) 14 15 TIMED( "clear_int", s.clear(); ) … … 17 18 REPEAT_N_TIMED( "print_int", N/2, print( out, _i, ":", _i, "\n" ); ) 18 19 20 std::pair<bool, char> max1 = { false, '\0' }; 19 21 stack<std::pair<bool, char>> s1, t1; 20 std::pair<bool, char> max1 = { false, '\0' };22 21 23 REPEAT_TIMED( "push_bool_char", s1.push( std::pair<bool, char>{ _i & 0x1, _i & 0x7F } ); ) 22 24 TIMED( "copy_bool_char", t1 = s1; )
Note: See TracChangeset
for help on using the changeset viewer.