git.iko.soy/distributed-process
on master help sign in
Turns out that -threaded is the culprit
commit99918182c3473883f3c8d4a519b5f7c7dfa267d4 authorEdsko de Vries <edsko@well-typed.com> dateThu 12 Apr 2012, 12:24 (15 years ago) parent636c94e
3 files changed+23−7
benchmarks/JustPing.gnuplot+8−2 benchmarks/Makefile+1−1 benchmarks/Makefile.JustPing+14−4
benchmarks/JustPing.gnuplot+8−2
@@ -1,4 +1,10 @@
11set title "Roundtrip (us)"
22set yrange [0:300]
3−plot "JustPingHaskell.data" every 100::50 title "Haskell (TCP)", \
4− "JustPingC.data" every 100::0 title "C"
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)", \
10+ "JustPingC.data" every 400::0 title "JustPingC"
benchmarks/Makefile+1−1
@@ -9,7 +9,7 @@ trials = 1
99INCLUDES= -i../network-transport/src -i../network-transport-pipes/src
1010
1111# Enable for profiling
12−PROFILING=-prof -fprof-auto
12+# PROFILING=-prof -fprof-auto
1313
1414ifeq ($(GHC),)
1515 GHC=ghc
benchmarks/Makefile.JustPing+14−4
@@ -2,11 +2,18 @@
22
33NUMPINGS=100000
44
5−.PHONY: run
6−run: JustPingC JustPingHaskell
5+.PHONY: showgraph
6+run: JustPingC.data JustPingHaskell.data JustPingHaskell2.data
7+ gnuplot ./JustPing.gnuplot
8+
9+JustPingC.data: JustPingC
710 time ./JustPingC $(NUMPINGS) 2>JustPingC.data
11+
12+JustPingHaskell.data: JustPingHaskell
813 time ./JustPingHaskell $(NUMPINGS) 2>JustPingHaskell.data
9− gnuplot ./JustPing.gnuplot
14+
15+JustPingHaskell2.data: JustPingHaskell2
16+ time ./JustPingHaskell2 $(NUMPINGS) 2>JustPingHaskell2.data
1017
1118JustPingC: JustPingC.c
1219 gcc -o JustPingC -O2 -std=c99 JustPingC.c
@@ -14,8 +21,11 @@ JustPingC: JustPingC.c
1421JustPingHaskell: JustPingHaskell.hs
1522 ghc -o JustPingHaskell -O2 JustPingHaskell.hs
1623
24+JustPingHaskell2: JustPingHaskell.hs
25+ ghc -o JustPingHaskell2 -O2 -threaded JustPingHaskell2.hs
26+
1727.PHONY: clean
1828clean:
19− rm -f JustPingC JustPingHaskell
29+ rm -f JustPingC JustPingHaskell JustPingHaskell2 *.data JustPing.ps
2030
2131# vi:set noexpandtab: