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 \
14 python/null.py-s python/null.py python/null.pypy
17 cycles,instructions,branches,branch-misses \
18 dtlb-loads,dtlb-load-misses,itlb-loads,itlb-load-misses \
19 cycles,instructions,cache-references,cache-misses \
20 cycles,instructions,stalled-cycles-frontend,stalled-cycles-backend
27 diet gcc -static -O2 -Wall -o $@ $<
31 diet gcc -O2 -Wall -o $@ $<
35 gcc -static -O2 -Wall -o $@ $<
39 gcc -O2 -Wall -o $@ $<
43 g++ -static -O2 -Wall -o $@ $<
47 g++ -O2 -Wall -o $@ $<
50 haskell/null-single: haskell/null.hs
51 ghc --make -O2 -Wall -o $@ $<
54 haskell/null-threaded: haskell/null.hs
55 ghc --make -O2 -Wall -threaded -o $@ $<
58 ocaml/null-byte: ocaml/null.ml
60 # no stripping as this is not an elf file
62 ocaml/null-opt: ocaml/null.ml
66 log: $(PROGS) $(SCRIPTS) Makefile
68 for prog in $(PROGS) $(SCRIPTS); do \
70 for metric in $(METRICS); do \
71 LC_ALL=C perf stat -e "$$metric" -r100 -o log --append ./$$prog; \
78 cd haskell && rm -f *.hi *.o
79 cd ocaml && rm -f *.cmo *.cmi *.cmx *.o