-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbenchmark.tex
109 lines (103 loc) · 4.17 KB
/
benchmark.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
\documentclass[crop,tikz]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\usetikzlibrary{pgfplots.colorbrewer}
\usepgfplotslibrary{groupplots}
\usepackage{pgfplotstable}
\begin{document}
\begin{tikzpicture}
\begin{groupplot}[
group style={
% set how the plots should be organized
group size=2 by 1,
% only show ticklabels and axis labels on the bottom
y descriptions at=edge left,
% set the `vertical sep' to zero
horizontal sep=5pt,
},
width=0.555\textwidth,
xmode=log,
log basis x={2},
ymajorgrids,
xmajorgrids,
xmin=16,
xlabel={term size},
ylabel={processing time (s)},
legend pos = south east,
legend cell align={left},
% xmax = 8192,
]
% \begin{axis}[
% ymode=log,
% log basis y={2},
% xmode=log,
% log basis x={2},
% ymajorgrids,
% xmajorgrids,
% xmin=16,
% legend pos = south east,
% xlabel={term size},
% ylabel={globalization time (s)},
% legend cell align={left},
% xmax = 8192,
% ]
\nextgroupplot[
ymode=log,
log basis y={10},
]
\addlegendimage{white, mark=none}
\addlegendentry{\underline{Algorithm}}
\addlegendimage{black, dashed, mark=none}
\addlegendentry{Naive}
\addlegendimage{black, mark=none}
\addlegendentry{Efficient}
\addplot+[Dark2-A, mark = o, mark size=0.5pt] table [x=x, y=q2, col sep=tab] {linear_efficient.tsv};
\label{plot:linear}
\addplot+[Dark2-A, mark = o, mark size=0.5pt, dashed] table [x=x, y=q2, col sep=tab] {linear_naive.tsv};
\addplot+[Dark2-B, mark = o, mark size=0.5pt] table [x=x, y=q2, col sep=tab] {random_efficient.tsv};
\label{plot:random}
\addplot+[Dark2-B, mark = o, mark size=0.5pt, dashed] table [x=x, y=q2, col sep=tab] {random_naive.tsv};
\addplot+[Dark2-C, mark = o, mark size=0.5pt] table [x=x, y=q2, col sep=tab] {balanced_efficient.tsv};
\label{plot:balanced}
\addplot+[Dark2-C, mark = o, mark size=0.5pt, dashed] table [x=x, y=q2, col sep=tab] {balanced_naive.tsv};
\addplot+[domain=1:4096, dotted, black, mark = .] {0.00000002 * x^2} node[above] {$n^2$};
\addplot+[domain=1:4096, dotted, black, mark = .] {0.00000006 * x * ln(x)/ln(2)} node[above] {$n\log n$};
\addplot+[domain=1:4096, dotted, black, mark = .] {0.00000003 * x} node [above] {$n$};
\node [draw,fill=white] at (rel axis cs: 0.21,0.82) {\shortstack[l]{
\quad\quad \underline{Term type} \\
\ref{plot:balanced} Balanced \\
\ref{plot:random} Random \\
\ref{plot:linear} Linear}};
\nextgroupplot[
ymode=log,
log basis y={10},
legend pos = south east,
legend cell align={left},
]
\addlegendimage{white, mark=none}
\addlegendentry{\underline{Term type}}
\addlegendimage{black, dashed, mark=none}
\addlegendentry{Balanced}
\addlegendimage{black, mark=none}
\addlegendentry{Linear}
\addplot+[Dark2-A, mark = o, mark size=0.5pt] table [x=x, y=oursint, col sep=tab] {compare_linear.tsv};
\label{plot:oursint}
\addplot+[Dark2-B, mark = o, mark size=0.5pt] table [x=x, y=ourscons, col sep=tab] {compare_linear.tsv};
\label{plot:ourscons}
\addplot+[Dark2-C, mark = o, mark size=0.5pt] table [x=x, y=mariarz, col sep=tab] {compare_linear.tsv};
\label{plot:mariarz}
\addplot+[Dark2-D, mark = o, mark size=0.5pt] table [x=x, y=valmari, col sep=tab] {compare_linear.tsv};
\label{plot:valmari}
\addplot+[Dark2-A, mark = o, mark size=0.5pt, dashed] table [x=x, y=oursint, col sep=tab] {compare_balanced.tsv};
\addplot+[Dark2-B, mark = o, mark size=0.5pt, dashed] table [x=x, y=ourscons, col sep=tab] {compare_balanced.tsv};
\addplot+[Dark2-C, mark = o, mark size=0.5pt, dashed] table [x=x, y=mariarz, col sep=tab] {compare_balanced.tsv};
\addplot+[Dark2-D, mark = o, mark size=0.5pt, dashed] table [x=x, y=valmari, col sep=tab] {compare_balanced.tsv};
\node [draw,fill=white] at (rel axis cs: 0.22,0.78) {\shortstack[l]{
\quad\quad \underline{Algorithm} \\
\ref{plot:oursint} Ours Hash \\
\ref{plot:ourscons} Ours Cons \\
\ref{plot:mariarz} Maziarz\\
\ref{plot:valmari} Valmari}};
\end{groupplot}
\end{tikzpicture}
\end{document}