[pypy-commit] extradoc extradoc: cut the plot of at 10x slower than C and write the factors into the plot. Puh,
cfbolz
noreply at buildbot.pypy.org
Fri Aug 17 18:03:52 CEST 2012
Author: Carl Friedrich Bolz <cfbolz at gmx.de>
Branch: extradoc
Changeset: r4691:cba71372826c
Date: 2012-08-17 18:01 +0200
http://bitbucket.org/pypy/extradoc/changeset/cba71372826c/
Log: cut the plot of at 10x slower than C and write the factors into the
plot. Puh, matplotlib is stressful.
cut the plot of at 10x slower than C and write the factors into the
plot. Puh, matplotlib is stressful.
diff --git a/talk/dls2012/benchmarks/parse.py b/talk/dls2012/benchmarks/parse.py
--- a/talk/dls2012/benchmarks/parse.py
+++ b/talk/dls2012/benchmarks/parse.py
@@ -79,18 +79,25 @@
#plt.subplot(111).set_xscale("log")
r = plt.plot([1, 1], [0, len(res)+0.5], 'k--')
legend = ([r[0]], ['gcc -O3'])
+ max_factor = 10
for i, l in enumerate(labels):
if not l:
continue
bottoms = x + (len(labels) - 1 - i) * width + 0.3/2
print bottoms
- r = plt.barh(bottoms, resmat[:,i]/resmat[:,-1], width,
+ result = resmat[:,i]/resmat[:,-1]
+ for k, entry in enumerate(result):
+ if entry > max_factor:
+ print bottoms[k], 1
+ plt.text(max_factor, bottoms[k], " %.1fx" % entry)
+ result[k] = max_factor
+ r = plt.barh(bottoms, result, width,
color=str(1. / (len(labels) - 1) * i))
legend[0].append(r[0])
legend[1].append(l)
plt.yticks(x + 0.5 + width, benchmarks)
- plt.subplots_adjust(left=0.35, right=0.95, top=0.99, bottom=0.02)
- plt.legend(*legend)
+ plt.subplots_adjust(left=0.35, right=0.93, top=0.99, bottom=0.02)
+ plt.legend(*legend, loc=4)
plt.ylim((0, len(res)+0.5))
#plt.show()
plt.savefig('result.pdf')
diff --git a/talk/dls2012/benchmarks/result.pdf b/talk/dls2012/benchmarks/result.pdf
index 02f7d1a7a84e10af3336b337b45e2ad37a6915a4..9a7e4831c4d43107a7f6eb8e74f160e2ba9f724c
GIT binary patch
[cut]
More information about the pypy-commit
mailing list