2 c/c-diet-static-null c/c-diet-dynamic-null \
3 c/c-libc-static-null c/c-libc-dynamic-null \
4 c/c++-static-null c/c++-dynamic-null \
5 haskell/null-single haskell/null-threaded \
6 ocaml/null-byte ocaml/null-opt
9 dash/null.dash bash/null.bash \
10 lua/null.lua51 lua/null.lua52 lua/null.luajit \
11 perl/null.pl ruby/null.rb \
12 php/null.php php/null.php-n \
13 tcl/null.tcl84 tcl/null.tcl85 tcl/null.tcl86 \
14 python/null.py26 python/null.py26-s \
15 python/null.py27 python/null.py27-s \
16 python/null.py32 python/null.py32-s \
20 cycles,instructions,branches,branch-misses \
21 dtlb-loads,dtlb-load-misses,itlb-loads,itlb-load-misses \
22 cycles,instructions,cache-references,cache-misses \
23 cycles,instructions,stalled-cycles-frontend,stalled-cycles-backend
32 diet gcc -static -O2 -Wall -o $@ $<
36 diet gcc -O2 -Wall -o $@ $<
40 gcc -static -O2 -Wall -o $@ $<
44 gcc -O2 -Wall -o $@ $<
48 g++ -static -O2 -Wall -o $@ $<
52 g++ -O2 -Wall -o $@ $<
55 haskell/null-single: haskell/null.hs
56 ghc --make -O2 -Wall -o $@ $<
59 haskell/null-threaded: haskell/null.hs
60 ghc --make -O2 -Wall -threaded -o $@ $<
63 ocaml/null-byte: ocaml/null.ml
65 # no stripping as this is not an elf file
67 ocaml/null-opt: ocaml/null.ml
71 log: $(PROGS) $(SCRIPTS) Makefile
73 for prog in $(PROGS) $(SCRIPTS); do \
75 for metric in $(METRICS); do \
76 LC_ALL=C perf stat -e "$$metric" -r $(REPS) -o log --append ./$$prog; \
83 cd haskell && rm -f *.hi *.o
84 cd ocaml && rm -f *.cmo *.cmi *.cmx *.o