git.iko.soy/distributed-process
on master help sign in
Turns out that -threaded is the culprit
9991818Edsko de Vries
benchmarks/JustPing.gnuplot+8−2
@@ -1,4 +1,10 @@
1set title "Roundtrip (us)"
1set title "Roundtrip (us)"
2set yrange [0:300]
2set yrange [0:300]
3−plot "JustPingHaskell.data" every 100::50 title "Haskell (TCP)", \
3+plot "JustPingHaskell.data" every 400::200 title "JustPingHaskell", \
4+ "JustPingHaskell2.data" every 400::100 title "JustPingHaskell (-threaded)", \
5+ "JustPingC.data" every 400::0 title "JustPingC"
6+set terminal postscript color
7+set output "JustPing.ps"
8+plot "JustPingHaskell.data" every 400::200 title "JustPingHaskell", \
9+ "JustPingHaskell2.data" every 400::100 title "JustPingHaskell (-threaded)", \
4− "JustPingC.data" every 100::0 title "C"
10+ "JustPingC.data" every 400::0 title "JustPingC"
benchmarks/Makefile+1−1
@@ -9,7 +9,7 @@ trials = 1
9INCLUDES= -i../network-transport/src -i../network-transport-pipes/src
9INCLUDES= -i../network-transport/src -i../network-transport-pipes/src
10
10
11# Enable for profiling
11# Enable for profiling
12−PROFILING=-prof -fprof-auto
12+# PROFILING=-prof -fprof-auto
13
13
14ifeq ($(GHC),)
14ifeq ($(GHC),)
15 GHC=ghc
15 GHC=ghc
benchmarks/Makefile.JustPing+14−4
@@ -2,11 +2,18 @@
2
2
3NUMPINGS=100000
3NUMPINGS=100000
4
4
5−.PHONY: run
5+.PHONY: showgraph
6−run: JustPingC JustPingHaskell
6+run: JustPingC.data JustPingHaskell.data JustPingHaskell2.data
7+ gnuplot ./JustPing.gnuplot
8+
9+JustPingC.data: JustPingC
7 time ./JustPingC $(NUMPINGS) 2>JustPingC.data
10 time ./JustPingC $(NUMPINGS) 2>JustPingC.data
11+
12+JustPingHaskell.data: JustPingHaskell
8 time ./JustPingHaskell $(NUMPINGS) 2>JustPingHaskell.data
13 time ./JustPingHaskell $(NUMPINGS) 2>JustPingHaskell.data
9− gnuplot ./JustPing.gnuplot
14+
15+JustPingHaskell2.data: JustPingHaskell2
16+ time ./JustPingHaskell2 $(NUMPINGS) 2>JustPingHaskell2.data
10
17
11JustPingC: JustPingC.c
18JustPingC: JustPingC.c
12 gcc -o JustPingC -O2 -std=c99 JustPingC.c
19 gcc -o JustPingC -O2 -std=c99 JustPingC.c
@@ -14,8 +21,11 @@ JustPingC: JustPingC.c
14JustPingHaskell: JustPingHaskell.hs
21JustPingHaskell: JustPingHaskell.hs
15 ghc -o JustPingHaskell -O2 JustPingHaskell.hs
22 ghc -o JustPingHaskell -O2 JustPingHaskell.hs
16
23
24+JustPingHaskell2: JustPingHaskell.hs
25+ ghc -o JustPingHaskell2 -O2 -threaded JustPingHaskell2.hs
26+
17.PHONY: clean
27.PHONY: clean
18clean:
28clean:
19− rm -f JustPingC JustPingHaskell
29+ rm -f JustPingC JustPingHaskell JustPingHaskell2 *.data JustPing.ps
20
30
21# vi:set noexpandtab:
31# vi:set noexpandtab: