chiark / gitweb /
Makefile, chain.c: Use Xyla found using `pkg-config'.
[wordchain] / graphs.tex
1 \documentclass{strayman}
2
3 \usepackage[T1]{fontenc}
4 \usepackage[palatino, helvetica, courier, maths = palatino]{mdwfonts}
5 \usepackage{mdwtab}
6 \usepackage{dcolumn}
7
8 \usepackage{tikz}
9 \usepackage{pgfplots}
10   \usepgfplotslibrary{statistics}
11
12 \pgfplotsset{compat = 1.16, width = 0.8\textwidth}
13
14 \errorcontextlines=\maxdimen
15
16 \begin{document}
17
18 %%\begin{figure}
19 %%  \centering
20 %%  \begin{tikzpicture}
21 %%    \pgfplotsset
22 %%      {xmin = 0, y dir = reverse, height = 160mm,
23 %%       typeset ticklabels with strut,
24 %%       enlarge y limits = 0.02,
25 %%       cycle list = {},
26 %%     \input{t.tex}
27 %%  \end{tikzpicture}
28 %%\end{figure}
29
30 \begin{figure}
31   \centering
32   \begin{tikzpicture}
33     \begin{axis}
34         [xlabel = Implementation,
35          xtick = data,
36          x tick label style =
37            { rotate = 60, anchor = north east, font = \sffamily },
38          enlarge x limits = 0.02,
39          ylabel = Time (ns/word),
40          ymin = 0, yticklabel style = {/pgf/number format/.cd, 1000 sep = \,},
41          legend cell align = left,
42          width = 0.95 \textwidth,
43          height = 0.60 \textheight,
44          symbolic x coords =
45            {c++-map, c++-uomap,
46             golang,
47             libavl-avl, libavl-pavl, libavl-rtavl, libavl-tavl,
48             libavl-rb, libavl-prb, libavl-rtrb, libavl-trb,
49             %lisp-ccl, lisp-clisp, lisp-cmucl, lisp-ecl,
50             lisp-sbcl,
51             mLib-sym,
52             %perl, python,
53             posix-hsearch1, posix-hsearchg, posix-tsearch,
54             qptrie-qp-fanf, qptrie-qp-mdw, qptrie-qp-list,
55             qptrie-fn-fanf, qptrie-fn-mdw, qptrie-fn-list,
56             rust-btree, rust-hash,
57             sgt-tree234,
58             xyla-avl, xyla-rb, xyla-splay, xyla-treap}]
59       \addplot+[sharp plot]
60         table[x = impl, y = small] from {summary.dat};
61       \addlegendentry{\textsf{small}}
62       \addplot+[sharp plot]
63         table[x = impl, y = medium] from {summary.dat};
64       \addlegendentry{\textsf{medium}}
65       \addplot+[sharp plot]
66         table[x = impl, y = large] from {summary.dat};
67       \addlegendentry{\textsf{large}}
68       \addplot+[sharp plot]
69         table[x = impl, y = huge] from {summary.dat};
70       \addlegendentry{\textsf{huge}}
71       \addplot+[sharp plot]
72         table[x = impl, y = insane] from {summary.dat};
73       \addlegendentry{\textsf{insane}}
74     \end{axis}
75   \end{tikzpicture}
76
77   \caption{Performance of various associative mapping implementations}
78   \label{fig:perf}
79 \end{figure}
80
81 \begin{table}
82   \begin{tabular}[C]{llrr}                                         \hlx*{hv}
83     \textbf{Dictionary}
84       & \textbf{Filename}
85       & \multicolumn{1}{c}{\textbf{Words}}
86       & \multicolumn{1}{c}{\textbf{Bytes}}                      \\ \hlx{vhv}
87     \textsf{small}      & \texttt{british-english-small}
88                                 &       50\,792 &      465\,516 \\
89     \textsf{medium}     & \texttt{british-english}
90                                 &      101\,921 &      968\,222 \\
91     \textsf{large}      & \texttt{british-english-large}
92                                 &      166\,747 &   1\,635\,703 \\
93     \textsf{huge}       & \texttt{british-english-huge}
94                                 &      344\,817 &   3\,532\,576 \\
95     \textsf{insane}     & \texttt{british-english-insane}
96                                 &      654\,276 &   6\,875\,495 \\ \hlx*{vh}
97   \end{tabular}
98
99   \caption{Dictionaries used in this experieent}
100   \label{tab:dict}
101 \end{table}
102
103 \begin{table}
104   \input{sumtab.tex}
105   \caption{Performance of various associative mapping implementations.
106     Entries show times in nanoseconds per word, followed by ranking in
107     parentheses.}
108   \label{tab:perf}
109 \end{table}
110
111 \end{document}