Changeset b276be5


Ignore:
Timestamp:
Apr 8, 2017, 6:02:59 PM (8 years ago)
Author:
Aaron Moss <a3moss@…>
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
Message:

Further updates to benchmarks (new C++ virtual benchmark still slightly broken)

Location:
doc/generic_types/evaluation
Files:
5 added
4 edited
1 moved

Legend:

Unmodified
Added
Removed
  • doc/generic_types/evaluation/.gitignore

    rd919f47 rb276be5  
    11c-bench
    22cpp-bench
     3cpp-vbench
    34cfa-bench
    4 c2-bench
    5 cpp2-bench
    6 cfa2-bench
    75*.o
    86*.d
  • doc/generic_types/evaluation/Makefile

    rd919f47 rb276be5  
    11CFA = my-cfa
    22DEPFLAGS = -MMD -MP
    3 OPT = -O2
    4 CFLAGS = $(OPT)
    5 CXXFLAGS = $(OPT)
     3CFLAGS = -O2 -flto
     4CXXFLAGS = $(CFLAGS) --std=c++14
    65
    7 .PHONY: all clean distclean bench
     6.PHONY: all clean distclean run-c run-cpp run-cfa run
    87
    98all: c-bench cpp-bench cfa-bench
     
    2827COBJS = c-stack.o
    2928CPPOBJS =
     29CPPVOBJS = cpp-vstack.o
    3030CFAOBJS = cfa-stack.o
    3131
     
    3636        $(COMPILE.cpp) -o $@ $< $(CPPOBJS) $(LDFLAGS)
    3737
     38cpp-vbench: cpp-vbench.cpp cpp-vbench.d $(CPPVOBJS)
     39        $(COMPILE.cpp) -o $@ $< $(CPPVOBJS) $(LDFLAGS)
     40
    3841cfa-bench: cfa-bench.c cfa-bench.d $(CFAOBJS)
    3942        $(COMPILE.cfa) -o $@ $< $(CFAOBJS) $(LDFLAGS)
     
    4245        -rm $(COBJS) c-bench
    4346        -rm $(CPPOBJS) cpp-bench
     47        -rm $(CPPVOBJS) cpp-vbench
    4448        -rm $(CFAOBJS) cfa-bench
    4549
     
    4751        -rm $(COBJS:.o=.d) c-bench.d
    4852        -rm $(CPPOBJS:.o=.d) cpp-bench.d
     53        -rm $(CPPVOBJS:.o=.d) cpp-vbench.d
    4954        -rm $(CFAOBJS:.o=.d) cfa-bench.d
    5055
    51 bench: c-bench cpp-bench cfa-bench
     56run-c: c-bench
    5257        @echo '## C ##'
    5358        @./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
     62run-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
     68run-cpp: cpp-bench
    5469        @echo '## C++ ##'
    5570        @./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
     74run-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
     80run: run-c run-cfa run-cpp run-cppv
    5881
    5982# so make doesn't fail without dependency files
  • doc/generic_types/evaluation/bench.h

    rd919f47 rb276be5  
    44#include <time.h>
    55
    6  #define N 50000000
     6 #define N 100000000
    77 
    88
     
    1212
    1313#define TIMED(name, code) { \
    14         clock_t _start, _end; \
     14        volatile clock_t _start, _end; \
    1515        _start = clock(); \
    1616        code \
  • doc/generic_types/evaluation/cpp-bench.cpp

    rd919f47 rb276be5  
    11#include <stdlib.h>
    2 #include "bench.h"
    3 #include "cpp-stack.h"
     2#include "bench.hpp"
     3#include "cpp-stack.hpp"
    44
    55int main(int argc, char** argv) {
  • doc/generic_types/evaluation/cpp-stack.hpp

    rd919f47 rb276be5  
    4747                clear();
    4848                copy(o);
    49                 return *this;if ( this == &o ) return *this;
     49                return *this;
    5050        }
    5151
Note: See TracChangeset for help on using the changeset viewer.