Index: Jenkinsfile
===================================================================
--- Jenkinsfile	(revision 1d76f8a45217558d053b166db26d7751469c0fa8)
+++ Jenkinsfile	(revision c6f1f3ebf65fd583f3f052ae0aed817e4ce7f4fc)
@@ -106,24 +106,4 @@
 
 def build() {
-	// build_stage('Build', true) {
-	// 	// Build outside of the src tree to ease cleaning
-	// 	dir (BuildDir) {
-	// 		//Configure the conpilation (Output is not relevant)
-	// 		//Use the current directory as the installation target so nothing escapes the sandbox
-	// 		//Also specify the compiler by hand
-	// 		targets=""
-	// 		if( Settings.RunAllTests || Settings.RunBenchmark ) {
-	// 			targets="--with-target-hosts='host:debug,host:nodebug'"
-	// 		} else {
-	// 			targets="--with-target-hosts='host:debug'"
-	// 		}
-
-	// 		sh "${SrcDir}/configure CXX=${Settings.Compiler.CXX} CC=${Settings.Compiler.CC} ${Settings.Architecture.flags} ${targets} --quiet"
-
-	// 		//Compile the project
-	// 		sh 'make -j 8 --no-print-directory'
-	// 	}
-	// }
-
 	debug = true
 	release = Settings.RunAllTests || Settings.RunBenchmark
@@ -195,5 +175,5 @@
 		dir (BuildDir) {
 			//Append bench results
-			sh "make --no-print-directory -C benchmark jenkins"
+			sh "make --no-print-directory -C benchmark jenkins arch=${Settings.Architecture.name}"
 		}
 	}
@@ -221,8 +201,12 @@
 
 		//Then publish the results
-		do_plot(Settings.RunBenchmark && Settings.Publish, 'compile'  , groupCompile    , 'Compilation')
-		do_plot(Settings.RunBenchmark && Settings.Publish, 'ctxswitch', groupConcurrency, 'Context Switching')
-		do_plot(Settings.RunBenchmark && Settings.Publish, 'mutex'    , groupConcurrency, 'Mutual Exclusion')
-		do_plot(Settings.RunBenchmark && Settings.Publish, 'signal'   , groupConcurrency, 'Internal and External Scheduling')
+		do_plot(Settings.RunBenchmark && Settings.Publish, 'compile'       , groupCompile    , 'Compilation')
+		do_plot(Settings.RunBenchmark && Settings.Publish, 'compile-diff'  , groupCompile    , 'Compilation Speed-Up')
+		do_plot(Settings.RunBenchmark && Settings.Publish, 'ctxswitch'     , groupConcurrency, 'Context Switching')
+		do_plot(Settings.RunBenchmark && Settings.Publish, 'ctxswitch-diff', groupConcurrency, 'Context Switching Speed-Up')
+		do_plot(Settings.RunBenchmark && Settings.Publish, 'mutex'         , groupConcurrency, 'Mutual Exclusion')
+		do_plot(Settings.RunBenchmark && Settings.Publish, 'mutex-diff'    , groupConcurrency, 'Mutual Exclusion Speed-Up')
+		do_plot(Settings.RunBenchmark && Settings.Publish, 'signal'        , groupConcurrency, 'Internal and External Scheduling')
+		do_plot(Settings.RunBenchmark && Settings.Publish, 'signal-diff'   , groupConcurrency, 'Internal and External Scheduling Speed-Up')
 	}
 }
Index: benchmark/Makefile.am
===================================================================
--- benchmark/Makefile.am	(revision 1d76f8a45217558d053b166db26d7751469c0fa8)
+++ benchmark/Makefile.am	(revision c6f1f3ebf65fd583f3f052ae0aed817e4ce7f4fc)
@@ -51,4 +51,5 @@
 STATS    = ${abs_top_srcdir}/tools/stat.py
 repeats  = 3 # 30
+arch     = x64
 skipcompile = no
 TIME_FORMAT = "%E"
@@ -99,14 +100,22 @@
 @DOifskipcompile@
 	@+make compile.csv
+	@-+make compile.diff.csv
 @DOendif@
 	@+make ctxswitch.csv
+	@-+make ctxswitch.diff.csv
 	@+make mutex.csv
+	@-+make mutex.diff.csv
 	@+make signal.csv
+	@-+make signal.diff.csv
 @DOifskipcompile@
-	@cat compile.csv
+	cat compile.csv
+	-cat compile.diff.csv
 @DOendif@
-	@cat ctxswitch.csv
-	@cat mutex.csv
-	@cat signal.csv
+	cat ctxswitch.csv
+	-cat ctxswitch.diff.csv
+	cat mutex.csv
+	-cat mutex.diff.csv
+	cat signal.csv
+	-cat signal.diff.csv
 
 compile.csv:
@@ -142,4 +151,9 @@
 	@+make waitfor-cfa2.runquiet >> $@
 	@$(srcdir)/fixcsv.sh $@
+
+%.diff.csv: %.csv
+	@test -e $(srcdir)/baselines/$(arch)/$< || (echo "Error : Missing baseline for ${<}" && false)
+	@$(srcdir)/baselines/calc.py $(srcdir)/baselines/$(arch)/$(<) $(<) > $@
+
 
 ## =========================================================================================================
Index: benchmark/Makefile.in
===================================================================
--- benchmark/Makefile.in	(revision 1d76f8a45217558d053b166db26d7751469c0fa8)
+++ benchmark/Makefile.in	(revision c6f1f3ebf65fd583f3f052ae0aed817e4ce7f4fc)
@@ -397,4 +397,5 @@
 STATS = ${abs_top_srcdir}/tools/stat.py
 repeats = 3 # 30
+arch = x64
 skipcompile = no
 TIME_FORMAT = "%E"
@@ -761,14 +762,22 @@
 @DOifskipcompile@
 	@+make compile.csv
+	@-+make compile.diff.csv
 @DOendif@
 	@+make ctxswitch.csv
+	@-+make ctxswitch.diff.csv
 	@+make mutex.csv
+	@-+make mutex.diff.csv
 	@+make signal.csv
+	@-+make signal.diff.csv
 @DOifskipcompile@
-	@cat compile.csv
+	cat compile.csv
+	-cat compile.diff.csv
 @DOendif@
-	@cat ctxswitch.csv
-	@cat mutex.csv
-	@cat signal.csv
+	cat ctxswitch.csv
+	-cat ctxswitch.diff.csv
+	cat mutex.csv
+	-cat mutex.diff.csv
+	cat signal.csv
+	-cat signal.diff.csv
 
 compile.csv:
@@ -805,4 +814,8 @@
 	@$(srcdir)/fixcsv.sh $@
 
+%.diff.csv: %.csv
+	@test -e $(srcdir)/baselines/$(arch)/$< || (echo "Error : Missing baseline for ${<}" && false)
+	@$(srcdir)/baselines/calc.py $(srcdir)/baselines/$(arch)/$(<) $(<) > $@
+
 loop$(EXEEXT):
 	$(BENCH_V_CC)$(COMPILE) -DBENCH_N=5000000000 $(srcdir)/loop.c
Index: benchmark/baselines/calc.py
===================================================================
--- benchmark/baselines/calc.py	(revision c6f1f3ebf65fd583f3f052ae0aed817e4ce7f4fc)
+++ benchmark/baselines/calc.py	(revision c6f1f3ebf65fd583f3f052ae0aed817e4ce7f4fc)
@@ -0,0 +1,27 @@
+#!/usr/bin/python3
+
+import sys
+
+if len(sys.argv) != 3:
+	print("Usage: %s baseline.csv result.csv" % sys.argv[0], file=sys.stderr)
+	exit(1)
+
+with open(sys.argv[1]) as baseline, open(sys.argv[2]) as result:
+	contentB = baseline.read().splitlines()
+	contentR = result  .read().splitlines()
+	headerB = contentB[0].split(',')
+	headerR = contentR[0].split(',')
+	valuesB = [float(v) for v in contentB[1].split(',')]
+	valuesR = [float(v) for v in contentR[1].split(',')]
+
+	dataB = {label: value for label, value in zip(headerB, valuesB)}
+	dataR = {label: value for label, value in zip(headerR, valuesR)}
+
+	if set(dataB) - set(dataR) or set(dataR) - set(dataB):
+		print("Error: baseline and result differ in number of values", file=sys.stderr)
+		exit(2)
+
+	out = {label : "{0:.3f}".format(num / dataB[label]) for label, num in dataR.items()}
+
+	print(','.join( out.keys() ))
+	print(','.join( out.values() ))
Index: benchmark/baselines/x64/compile.csv
===================================================================
--- benchmark/baselines/x64/compile.csv	(revision c6f1f3ebf65fd583f3f052ae0aed817e4ce7f4fc)
+++ benchmark/baselines/x64/compile.csv	(revision c6f1f3ebf65fd583f3f052ae0aed817e4ce7f4fc)
@@ -0,0 +1,2 @@
+attributes,typeof,array,monitor,empty,expression,io,operators
+4.575416666666667,3.378541666666667,3.571875,255.95166666666663,3.4189583333333324,3.578125,293.9122916666668,3.563541666666666
Index: benchmark/baselines/x64/ctxswitch.csv
===================================================================
--- benchmark/baselines/x64/ctxswitch.csv	(revision c6f1f3ebf65fd583f3f052ae0aed817e4ce7f4fc)
+++ benchmark/baselines/x64/ctxswitch.csv	(revision c6f1f3ebf65fd583f3f052ae0aed817e4ce7f4fc)
@@ -0,0 +1,2 @@
+coroutine,thread,generator
+31.045337499999988,76.85271458333335,2.0151035416666665
Index: benchmark/baselines/x64/mutex.csv
===================================================================
--- benchmark/baselines/x64/mutex.csv	(revision c6f1f3ebf65fd583f3f052ae0aed817e4ce7f4fc)
+++ benchmark/baselines/x64/mutex.csv	(revision c6f1f3ebf65fd583f3f052ae0aed817e4ce7f4fc)
@@ -0,0 +1,2 @@
+1-monitor,2-monitor
+40.213872916666666,70.85164583333331
Index: benchmark/baselines/x64/signal.csv
===================================================================
--- benchmark/baselines/x64/signal.csv	(revision c6f1f3ebf65fd583f3f052ae0aed817e4ce7f4fc)
+++ benchmark/baselines/x64/signal.csv	(revision c6f1f3ebf65fd583f3f052ae0aed817e4ce7f4fc)
@@ -0,0 +1,2 @@
+waitfor-2,signal-1,signal-2,waitfor-1
+393.69606249999987,325.99158333333327,409.01025000000004,319.90975000000003
Index: benchmark/baselines/x86/compile.csv
===================================================================
--- benchmark/baselines/x86/compile.csv	(revision c6f1f3ebf65fd583f3f052ae0aed817e4ce7f4fc)
+++ benchmark/baselines/x86/compile.csv	(revision c6f1f3ebf65fd583f3f052ae0aed817e4ce7f4fc)
@@ -0,0 +1,2 @@
+empty,expression,operators,typeof,array,monitor,io,attributes
+3.7012244897959197,3.8785714285714294,3.898163265306122,3.7202040816326525,3.7569387755102026,264.9081632653059,319.54408163265316,4.86795918367347
Index: benchmark/baselines/x86/ctxswitch.csv
===================================================================
--- benchmark/baselines/x86/ctxswitch.csv	(revision c6f1f3ebf65fd583f3f052ae0aed817e4ce7f4fc)
+++ benchmark/baselines/x86/ctxswitch.csv	(revision c6f1f3ebf65fd583f3f052ae0aed817e4ce7f4fc)
@@ -0,0 +1,2 @@
+coroutine,generator,thread
+33.10828367346939,3.189955102040816,112.80995918367347
Index: benchmark/baselines/x86/mutex.csv
===================================================================
--- benchmark/baselines/x86/mutex.csv	(revision c6f1f3ebf65fd583f3f052ae0aed817e4ce7f4fc)
+++ benchmark/baselines/x86/mutex.csv	(revision c6f1f3ebf65fd583f3f052ae0aed817e4ce7f4fc)
@@ -0,0 +1,2 @@
+2-monitor,1-monitor
+88.02230408163267,54.31430408163266
Index: benchmark/baselines/x86/signal.csv
===================================================================
--- benchmark/baselines/x86/signal.csv	(revision c6f1f3ebf65fd583f3f052ae0aed817e4ce7f4fc)
+++ benchmark/baselines/x86/signal.csv	(revision c6f1f3ebf65fd583f3f052ae0aed817e4ce7f4fc)
@@ -0,0 +1,2 @@
+signal-2,waitfor-1,waitfor-2,signal-1
+532.5297959183672,413.3084897959184,506.7579591836735,423.78826530612247
Index: tools/baseline.py
===================================================================
--- tools/baseline.py	(revision c6f1f3ebf65fd583f3f052ae0aed817e4ce7f4fc)
+++ tools/baseline.py	(revision c6f1f3ebf65fd583f3f052ae0aed817e4ce7f4fc)
@@ -0,0 +1,45 @@
+#!/usr/bin/python3
+
+import sys
+
+import urllib.request
+import re
+import json
+
+if len(sys.argv) != 3 :
+ 	sys.exit("Expected architecture and file name as arguments")
+
+build_cache = {}
+
+def build(number):
+	if number in build_cache:
+		return build_cache[number]
+
+	url = "https://cforall.uwaterloo.ca/jenkins/job/Cforall/job/master/%s/api/json?" % number
+	f = urllib.request.urlopen(url)
+	j = json.loads(f.read().decode("utf-8"))
+	res = re.search("([^:]+):(x86|x64)", j['description'])
+
+	build_cache.update({number : (res.group(1), res.group(2))})
+	return build_cache[number]
+
+content = {}
+try:
+	with open(sys.argv[2]) as f:
+		f.readline()
+		f.readline()
+
+		for l in f:
+			data = [d.replace('"', '') for d in l.split(',')]
+			number = data[2]
+			_, arch = build(number)
+			if arch == sys.argv[1]:
+				if not data[1] in content:
+					content.update({data[1] : []})
+
+				content[data[1]].append(float(data[0]))
+except IOError as e:
+	sys.exit(e.strerror)
+
+print(','.join(content.keys()))
+print(','.join([str(sum(vals) / len(vals)) for vals in content.values()]))
