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 \
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
30 diet gcc -static -O2 -Wall -o $@ $<
34 diet gcc -O2 -Wall -o $@ $<
38 gcc -static -O2 -Wall -o $@ $<
42 gcc -O2 -Wall -o $@ $<
46 g++ -static -O2 -Wall -o $@ $<
50 g++ -O2 -Wall -o $@ $<
53 haskell/null-single: haskell/null.hs
54 ghc --make -O2 -Wall -o $@ $<
57 haskell/null-threaded: haskell/null.hs
58 ghc --make -O2 -Wall -threaded -o $@ $<
61 ocaml/null-byte: ocaml/null.ml
63 # no stripping as this is not an elf file
65 ocaml/null-opt: ocaml/null.ml
69 log: $(PROGS) $(SCRIPTS) Makefile
71 for prog in $(PROGS) $(SCRIPTS); do \
73 for metric in $(METRICS); do \
74 LC_ALL=C perf stat -e "$$metric" -r100 -o log --append ./$$prog; \
81 cd haskell && rm -f *.hi *.o
82 cd ocaml && rm -f *.cmo *.cmi *.cmx *.o