source: tests/zombies/string-perf/Makefile @ 4d0eb1c

enumpthread-emulation
Last change on this file since 4d0eb1c was 4d0eb1c, checked in by Michael Brooks <mlbrooks@…>, 9 months ago

Switching top loop to count operations done in 10 sec

  • Property mode set to 100644
File size: 2.7 KB
Line 
1
2CFABUILD = ~/cfa2/build-perf
3LIBCFA = $(CFABUILD)/libcfa/*/src/.libs/libcfa.so
4
5CFA = $(CFABUILD)/driver/cfa
6PERFFLAGS_CFA = -nodebug -O2
7PERFFLAGS_CXX = -DNDEBUG -O2
8
9
10PERFPROGS = \
11        perfexp-cfa-hl-pta-share \
12        perfexp-cfa-hl-peq-share \
13        perfexp-cfa-ll-pta-share \
14        perfexp-cfa-ll-peq-share \
15        perfexp-cfa-hl-pta-noshare \
16        perfexp-cfa-hl-peq-noshare \
17        perfexp-cfa-ll-pta-noshare \
18        perfexp-cfa-ll-peq-noshare \
19        perfexp-stl-pta \
20        perfexp-stl-peq \
21        perfexp-buhr94-pta \
22        perfexp-buhr94-peq
23
24all : $(PERFPROGS)
25
26perfexp-cfa-hl-pta-share : prog.cfa $(LIBCFA)
27        $(CFA) $(PERFFLAGS_CFA) $< -o $@ -DIMPL_CFA_HL_SHARE -DOP_PLUS_THEN_ASSIGN
28
29perfexp-cfa-hl-peq-share : prog.cfa $(LIBCFA)
30        $(CFA) $(PERFFLAGS_CFA) $< -o $@ -DIMPL_CFA_HL_SHARE -DOP_PLUSEQ
31
32perfexp-cfa-ll-pta-share : prog.cfa $(LIBCFA)
33        $(CFA) $(PERFFLAGS_CFA) $< -o $@ -DIMPL_CFA_LL_SHARE -DOP_PLUS_THEN_ASSIGN
34
35perfexp-cfa-ll-peq-share : prog.cfa $(LIBCFA)
36        $(CFA) $(PERFFLAGS_CFA) $< -o $@ -DIMPL_CFA_LL_SHARE -DOP_PLUSEQ
37
38perfexp-cfa-hl-pta-noshare : prog.cfa $(LIBCFA)
39        $(CFA) $(PERFFLAGS_CFA) $< -o $@ -DIMPL_CFA_HL_NOSHARE -DOP_PLUS_THEN_ASSIGN
40
41perfexp-cfa-hl-peq-noshare : prog.cfa $(LIBCFA)
42        $(CFA) $(PERFFLAGS_CFA) $< -o $@ -DIMPL_CFA_HL_NOSHARE -DOP_PLUSEQ
43
44perfexp-cfa-ll-pta-noshare : prog.cfa $(LIBCFA)
45        $(CFA) $(PERFFLAGS_CFA) $< -o $@ -DIMPL_CFA_LL_NOSHARE -DOP_PLUS_THEN_ASSIGN
46
47perfexp-cfa-ll-peq-noshare : prog.cfa $(LIBCFA)
48        $(CFA) $(PERFFLAGS_CFA) $< -o $@ -DIMPL_CFA_LL_NOSHARE -DOP_PLUSEQ
49
50perfexp-stl-pta : prog.cfa
51        $(CXX) -xc++ $(PERFFLAGS_CXX) $< -o $@ -DIMPL_STL -DOP_PLUS_THEN_ASSIGN
52
53perfexp-stl-peq : prog.cfa
54        $(CXX) -xc++ $(PERFFLAGS_CXX) $< -o $@ -DIMPL_STL -DOP_PLUSEQ
55
56perfexp-buhr94-pta.o : prog.cfa
57        $(CXX) -xc++ -c $(PERFFLAGS_CXX) $< -o $@ -DIMPL_BUHR94 -DOP_PLUS_THEN_ASSIGN
58
59perfexp-buhr94-peq.o : prog.cfa
60        $(CXX) -xc++ -c $(PERFFLAGS_CXX) $< -o $@ -DIMPL_BUHR94 -DOP_PLUSEQ
61
62buhr94-string.o:
63        $(CXX) -xc++ -c $(PERFFLAGS_CXX) ~/usys1/sm/string/StringSharing/src/string.cc -o $@
64
65buhr94-VbyteSM.o:
66        $(CXX) -xc++ -c $(PERFFLAGS_CXX) ~/usys1/sm/string/StringSharing/src/VbyteSM.cc -o $@
67
68perfexp-buhr94-pta : perfexp-buhr94-pta.o buhr94-string.o buhr94-VbyteSM.o
69        $(CXX) $(PERFFLAGS_CXX) $^ -o $@
70
71perfexp-buhr94-peq : perfexp-buhr94-peq.o buhr94-string.o buhr94-VbyteSM.o
72        $(CXX) $(PERFFLAGS_CXX) $^ -o $@
73
74clean:
75        rm -f *.o perfexp*
76
77MEASURE = $(PERFPROGS)
78CORPORI = corpus-100-*-1.txt
79
80measurement: $(MEASURE)
81        tofile=measurement-`date '+%F--%H-%M-%S'`.csv ; \
82        echo $$tofile ; \
83        for prog in $(MEASURE) ; do \
84            for corpus in $(CORPORI) ; do \
85                        corpusbody=`cat $$corpus` ; \
86                        printed=`./$$prog 100 10 $$corpusbody` ; \
87                        echo $$prog,$$corpus,$$printed  >>  $$tofile ; \
88                done ; \
89        done ; \
90        cat $$tofile
Note: See TracBrowser for help on using the repository browser.