Changeset 0d10090 for doc/generic_types/evaluation/cpp-bench.cpp
- Timestamp:
- Apr 12, 2017, 9:36:33 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:
- 50b7e8c, d9dd3d1
- Parents:
- ff178ee
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/generic_types/evaluation/cpp-bench.cpp
rff178ee r0d10090 1 1 #include <algorithm> 2 #include <fstream> 2 3 #include <stdlib.h> 3 4 #include <utility> 4 5 #include "bench.hpp" 5 6 #include "cpp-stack.hpp" 7 #include "cpp-print.hpp" 6 8 7 9 int main(int argc, char** argv) { … … 45 47 max2 = std::max( max2, t2.pop() ); 46 48 ) 49 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", 56 print( out, std::pair<bool, char>{ rand() & 0x1, rand() & 0x7F }, ":", 57 std::pair<bool, char>{ rand() & 0x1, rand() & 0x7F }, "\n" ); 58 ) 47 59 }
Note: See TracChangeset
for help on using the changeset viewer.