Changeset 7a054e82 for doc/generic_types/evaluation/cpp-bench.cpp
- Timestamp:
- Apr 10, 2017, 3:17:29 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:
- b715c9a
- Parents:
- b0fedd4 (diff), b276be5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/generic_types/evaluation/cpp-bench.cpp
rb0fedd4 r7a054e82 1 1 #include <stdlib.h> 2 #include "bench.h "3 #include "cpp-stack.h "2 #include "bench.hpp" 3 #include "cpp-stack.hpp" 4 4 5 5 int main(int argc, char** argv) { … … 7 7 8 8 stack<int> s; 9 10 9 REPEAT_TIMED( "push_int", 11 10 s.push( rand() ); 12 11 ) 12 13 stack<int> t; 14 TIMED( "copy_int", 15 t = s; 16 ) 17 18 TIMED( "clear_int", 19 s.clear(); 20 ) 21 22 int sum; 23 REPEAT_TIMED( "pop_int", 24 sum += t.pop(); 25 ) 13 26 }
Note: See TracChangeset
for help on using the changeset viewer.