3 c/c-diet-static-null c/c-diet-dynamic-null \
4 c/c-libc-static-null c/c-libc-dynamic-null \
5 c/c++-static-null c/c++-dynamic-null \
6 haskell/null-single haskell/null-threaded \
7 ocaml/null-byte ocaml/null-opt
10 dash/null.dash bash/null.bash \
11 lua/null.lua51 lua/null.lua52 lua/null.luajit \
12 perl/null.pl ruby/null.rb \
13 php/null.php php/null.php-n \
14 tcl/null.tcl84 tcl/null.tcl85 tcl/null.tcl86 \
15 python/null.py26 python/null.py26-s \
16 python/null.py27 python/null.py27-s \
17 python/null.py32 python/null.py32-s \
21 cycles,instructions,branches,branch-misses \
22 dtlb-loads,dtlb-load-misses,itlb-loads,itlb-load-misses \
23 cycles,instructions,cache-references,cache-misses \
24 cycles,instructions,stalled-cycles-frontend,stalled-cycles-backend
38 diet gcc -static -O2 -Wall -o $@ $<
42 diet gcc -O2 -Wall -o $@ $<
46 gcc -static -O2 -Wall -o $@ $<
50 gcc -O2 -Wall -o $@ $<
54 g++ -static -O2 -Wall -o $@ $<
58 g++ -O2 -Wall -o $@ $<
61 haskell/null-single: haskell/null.hs
62 ghc --make -O2 -Wall -o $@ $<
65 haskell/null-threaded: haskell/null.hs
66 ghc --make -O2 -Wall -threaded -o $@ $<
69 ocaml/null-byte: ocaml/null.ml
71 # no stripping as this is not an elf file
73 ocaml/null-opt: ocaml/null.ml
77 log: $(PROGS) $(SCRIPTS) Makefile
79 for prog in $(PROGS) $(SCRIPTS); do \
81 for metric in $(METRICS); do \
82 LC_ALL=C perf stat -e "$$metric" -r $(REPS) -o log --append ./$$prog; \
90 cd haskell && rm -f *.hi *.o
91 cd ocaml && rm -f *.cmo *.cmi *.cmx *.o