- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/papers/general/evaluation/cpp-bench.cpp
r79d4186 r604e76d 1 1 #include <algorithm> 2 #include <fstream> 2 3 #include "bench.hpp" 3 4 #include "cpp-stack.hpp" 4 5 #include "cpp-pair.hpp" 6 #include "cpp-print.hpp" 5 7 6 8 int main(int argc, char** argv) { 9 std::ofstream out{"/dev/null"}; 7 10 int maxi = 0, vali = 42; 8 11 stack<int> si, ti; … … 12 15 TIMED( "clear_int", si.clear(); ) 13 16 REPEAT_TIMED( "pop_int", N, maxi = std::max( maxi, ti.pop() ); ) 17 REPEAT_TIMED( "print_int", N/2, print( out, vali, ":", vali, "\n" ); ) 14 18 15 19 pair<bool, char> maxp = { false, '\0' }, valp = { true, 'a' }; … … 20 24 TIMED( "clear_pair", sp.clear(); ) 21 25 REPEAT_TIMED( "pop_pair", N, maxp = std::max( maxp, tp.pop() ); ) 26 REPEAT_TIMED( "print_pair", N/2, print( out, valp, ":", valp, "\n" ); ) 22 27 }
Note:
See TracChangeset
for help on using the changeset viewer.