summaryrefslogtreecommitdiffstats
path: root/plot.py
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-09-15 18:58:27 +0000
committerDavid Robillard <d@drobilla.net>2011-09-15 18:58:27 +0000
commita267e6c2f935fcab94e66e0f1c897a9357d5f3a9 (patch)
tree95d06ba174a8c57c06e3959f3ab7cd927e53c581 /plot.py
parent62585c184ed99cb8acc11b025be414752d8b0240 (diff)
downloadzix-a267e6c2f935fcab94e66e0f1c897a9357d5f3a9.tar.gz
zix-a267e6c2f935fcab94e66e0f1c897a9357d5f3a9.tar.bz2
zix-a267e6c2f935fcab94e66e0f1c897a9357d5f3a9.zip
Benchmark sorted array.
git-svn-id: http://svn.drobilla.net/zix/trunk@10 df6676b4-ccc9-40e5-b5d6-7c4628a128e3
Diffstat (limited to 'plot.py')
-rwxr-xr-xplot.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/plot.py b/plot.py
index 78ba4d4..52e614d 100755
--- a/plot.py
+++ b/plot.py
@@ -22,18 +22,21 @@ for i in range(n_plots):
pyplot.ylabel('Time (s)')
ns = []
- zix_times = []
+ zix_tree_times = []
+ zix_sorted_array_times = []
glib_times = []
for line in file:
if line[0] == '#':
continue;
- (n, zix, glib) = line.split()
+ (n, zix_tree, zix_sorted_array, glib) = line.split()
ns.append(int(n))
- zix_times.append(float(zix))
+ zix_tree_times.append(float(zix_tree))
+ zix_sorted_array_times.append(float(zix_sorted_array))
glib_times.append(float(glib))
file.close()
- matplotlib.pyplot.plot(ns, zix_times, '-o', label='ZixTree')
+ matplotlib.pyplot.plot(ns, zix_tree_times, '-o', label='ZixTree')
+ matplotlib.pyplot.plot(ns, zix_sorted_array_times, '-o', label='ZixSortedArray')
matplotlib.pyplot.plot(ns, glib_times, '-x', label='GSequence')
pyplot.legend(loc='upper left')
pyplot.title(os.path.splitext(os.path.basename(filename))[0].title())