chiark / gitweb /
more stuff found lying about
[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             qptrie-qp-fanf, qptrie-qp-mdw, qptrie-qp-list,
54             qptrie-fn-fanf, qptrie-fn-mdw, qptrie-fn-list,
55             rust-btree, rust-hash,
56             sgt-tree234,
57             xyla-avl, xyla-rb, xyla-splay, xyla-treap}]
58       \addplot+[sharp plot]
59         table[x = impl, y = small] from {summary.dat};
60       \addlegendentry{\textsf{small}}
61       \addplot+[sharp plot]
62         table[x = impl, y = medium] from {summary.dat};
63       \addlegendentry{\textsf{medium}}
64       \addplot+[sharp plot]
65         table[x = impl, y = large] from {summary.dat};
66       \addlegendentry{\textsf{large}}
67       \addplot+[sharp plot]
68         table[x = impl, y = huge] from {summary.dat};
69       \addlegendentry{\textsf{huge}}
70       \addplot+[sharp plot]
71         table[x = impl, y = insane] from {summary.dat};
72       \addlegendentry{\textsf{insane}}
73     \end{axis}
74   \end{tikzpicture}
75
76   \caption{Performance of various associative mapping implementations}
77   \label{fig:perf}
78 \end{figure}
79
80 \begin{table}
81   \begin{tabular}[C]{llrr}                                         \hlx*{hv}
82     \textbf{Dictionary}
83       & \textbf{Filename}
84       & \multicolumn{1}{c}{\textbf{Words}}
85       & \multicolumn{1}{c}{\textbf{Bytes}}                      \\ \hlx{vhv}
86     \textsf{small}      & \texttt{british-english-small}
87                                 &       50\,792 &      465\,516 \\
88     \textsf{medium}     & \texttt{british-english}
89                                 &      101\,921 &      968\,222 \\
90     \textsf{large}      & \texttt{british-english-large}
91                                 &      166\,747 &   1\,635\,703 \\
92     \textsf{huge}       & \texttt{british-english-huge}
93                                 &      344\,817 &   3\,532\,576 \\
94     \textsf{insane}     & \texttt{british-english-insane}
95                                 &      654\,276 &   6\,875\,495 \\ \hlx*{vh}
96   \end{tabular}
97
98   \caption{Dictionaries used in this experieent}
99   \label{tab:dict}
100 \end{table}
101
102 \begin{table}
103   \input{sumtab.tex}
104   \caption{Performance of various associative mapping implementations.
105     Entries show times in nanoseconds per word, followed by ranking in
106     parentheses.}
107   \label{tab:perf}
108 \end{table}
109
110 \end{document}