- Timestamp:
- Apr 10, 2017, 5:26:04 PM (8 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:
- 65cb413
- Parents:
- 2f0fc56
- Location:
- doc/generic_types/evaluation
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/generic_types/evaluation/Makefile
r2f0fc56 r47535a0d 55 55 56 56 run-c: c-bench 57 @echo 57 58 @echo '## C ##' 58 @ ./c-bench59 @printf 'source_size:\t% 7d lines\n' `cat c-bench.c bench.h c-stack.h c-stack.c | wc -l`60 @printf 'binary_size:\t% 7d bytes\n' `wc -c <c-bench`59 @/usr/bin/time -f 'max_memory:\t%M kilobytes' ./c-bench 60 @printf 'source_size:\t%8d lines\n' `cat c-bench.c bench.h c-stack.h c-stack.c | wc -l` 61 @printf 'binary_size:\t%8d bytes\n' `stat -c %s c-bench` 61 62 62 63 run-cfa: cfa-bench 64 @echo 63 65 @echo '## Cforall ##' 64 @ ./cfa-bench65 @printf 'source_size:\t% 7d lines\n' `cat cfa-bench.c bench.h cfa-stack.h cfa-stack.c | wc -l`66 @printf 'binary_size:\t% 7d bytes\n' `wc -c <cfa-bench`66 @/usr/bin/time -f 'max_memory:\t %M kilobytes' ./cfa-bench 67 @printf 'source_size:\t%8d lines\n' `cat cfa-bench.c bench.h cfa-stack.h cfa-stack.c | wc -l` 68 @printf 'binary_size:\t%8d bytes\n' `stat -c %s cfa-bench` 67 69 68 70 run-cpp: cpp-bench 71 @echo 69 72 @echo '## C++ ##' 70 @ ./cpp-bench71 @printf 'source_size:\t% 7d lines\n' `cat cpp-bench.cpp bench.hpp cpp-stack.hpp | wc -l`72 @printf 'binary_size:\t% 7d bytes\n' `wc -c <cpp-bench`73 @/usr/bin/time -f 'max_memory:\t %M kilobytes' ./cpp-bench 74 @printf 'source_size:\t%8d lines\n' `cat cpp-bench.cpp bench.hpp cpp-stack.hpp | wc -l` 75 @printf 'binary_size:\t%8d bytes\n' `stat -c %s cpp-bench` 73 76 74 77 run-cppv: cpp-vbench 78 @echo 75 79 @echo '## C++ virtual ##' 76 @ ./cpp-vbench77 @printf 'source_size:\t% 7d lines\n' `cat cpp-vbench.cpp bench.hpp object.hpp cpp-vstack.hpp cpp-vstack.cpp | wc -l`78 @printf 'binary_size:\t% 7d bytes\n' `wc -c <cpp-vbench`80 @/usr/bin/time -f 'max_memory:\t%M kilobytes' ./cpp-vbench 81 @printf 'source_size:\t%8d lines\n' `cat cpp-vbench.cpp bench.hpp object.hpp cpp-vstack.hpp cpp-vstack.cpp | wc -l` 82 @printf 'binary_size:\t%8d bytes\n' `stat -c %s cpp-vbench` 79 83 80 84 run: run-c run-cfa run-cpp run-cppv -
doc/generic_types/evaluation/bench.h
r2f0fc56 r47535a0d 4 4 #include <time.h> 5 5 6 #define N 100000000 7 6 #define N 100000000 8 7 9 8 long ms_between(clock_t start, clock_t end) { … … 16 15 code \ 17 16 _end = clock(); \ 18 printf("%s:\t% 7ld ms\n", name, ms_between(_start, _end)); \17 printf("%s:\t%8ld ms\n", name, ms_between(_start, _end)); \ 19 18 } 20 19 -
doc/generic_types/evaluation/bench.hpp
r2f0fc56 r47535a0d 5 5 #include <time.h> 6 6 7 #define N 100000000 8 7 static const int N = 100000000; 9 8 10 9 long ms_between(clock_t start, clock_t end) { … … 17 16 code \ 18 17 _end = clock(); \ 19 std::cout << name << ":\t" << std::setw( 7) << ms_between(_start, _end) << std::setw(0) << " ms" << std::endl; \18 std::cout << name << ":\t" << std::setw(8) << ms_between(_start, _end) << std::setw(0) << " ms" << std::endl; \ 20 19 } 21 20
Note: See TracChangeset
for help on using the changeset viewer.