Changeset b276be5
- Timestamp:
- Apr 8, 2017, 6:02:59 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:
- 2ccb93c, 2f0fc56, 7a054e82
- Parents:
- d919f47
- Location:
- doc/generic_types/evaluation
- Files:
-
- 5 added
- 4 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
doc/generic_types/evaluation/.gitignore
rd919f47 rb276be5 1 1 c-bench 2 2 cpp-bench 3 cpp-vbench 3 4 cfa-bench 4 c2-bench5 cpp2-bench6 cfa2-bench7 5 *.o 8 6 *.d -
doc/generic_types/evaluation/Makefile
rd919f47 rb276be5 1 1 CFA = my-cfa 2 2 DEPFLAGS = -MMD -MP 3 OPT = -O2 4 CFLAGS = $(OPT) 5 CXXFLAGS = $(OPT) 3 CFLAGS = -O2 -flto 4 CXXFLAGS = $(CFLAGS) --std=c++14 6 5 7 .PHONY: all clean distclean bench6 .PHONY: all clean distclean run-c run-cpp run-cfa run 8 7 9 8 all: c-bench cpp-bench cfa-bench … … 28 27 COBJS = c-stack.o 29 28 CPPOBJS = 29 CPPVOBJS = cpp-vstack.o 30 30 CFAOBJS = cfa-stack.o 31 31 … … 36 36 $(COMPILE.cpp) -o $@ $< $(CPPOBJS) $(LDFLAGS) 37 37 38 cpp-vbench: cpp-vbench.cpp cpp-vbench.d $(CPPVOBJS) 39 $(COMPILE.cpp) -o $@ $< $(CPPVOBJS) $(LDFLAGS) 40 38 41 cfa-bench: cfa-bench.c cfa-bench.d $(CFAOBJS) 39 42 $(COMPILE.cfa) -o $@ $< $(CFAOBJS) $(LDFLAGS) … … 42 45 -rm $(COBJS) c-bench 43 46 -rm $(CPPOBJS) cpp-bench 47 -rm $(CPPVOBJS) cpp-vbench 44 48 -rm $(CFAOBJS) cfa-bench 45 49 … … 47 51 -rm $(COBJS:.o=.d) c-bench.d 48 52 -rm $(CPPOBJS:.o=.d) cpp-bench.d 53 -rm $(CPPVOBJS:.o=.d) cpp-vbench.d 49 54 -rm $(CFAOBJS:.o=.d) cfa-bench.d 50 55 51 bench: c-bench cpp-bench cfa-bench56 run-c: c-bench 52 57 @echo '## C ##' 53 58 @./c-bench 59 @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` 61 62 run-cfa: cfa-bench 63 @echo '## Cforall ##' 64 @./cfa-bench 65 @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` 67 68 run-cpp: cpp-bench 54 69 @echo '## C++ ##' 55 70 @./cpp-bench 56 @echo '## Cforall ##' 57 @./cfa-bench 71 @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 74 run-cppv: cpp-vbench 75 @echo '## C++ virtual ##' 76 @./cpp-vbench 77 @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` 79 80 run: run-c run-cfa run-cpp run-cppv 58 81 59 82 # so make doesn't fail without dependency files -
doc/generic_types/evaluation/bench.h
rd919f47 rb276be5 4 4 #include <time.h> 5 5 6 #define N 500000006 #define N 100000000 7 7 8 8 … … 12 12 13 13 #define TIMED(name, code) { \ 14 clock_t _start, _end; \14 volatile clock_t _start, _end; \ 15 15 _start = clock(); \ 16 16 code \ -
doc/generic_types/evaluation/cpp-bench.cpp
rd919f47 rb276be5 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) { -
doc/generic_types/evaluation/cpp-stack.hpp
rd919f47 rb276be5 47 47 clear(); 48 48 copy(o); 49 return *this; if ( this == &o ) return *this;49 return *this; 50 50 } 51 51
Note: See TracChangeset
for help on using the changeset viewer.