\documentclass{strayman}

\usepackage[T1]{fontenc}
\usepackage[palatino, helvetica, courier, maths = palatino]{mdwfonts}
\usepackage{mdwtab}
\usepackage{dcolumn}

\usepackage{tikz}
\usepackage{pgfplots}
  \usepgfplotslibrary{statistics}

\pgfplotsset{compat = 1.16, width = 0.8\textwidth}

\errorcontextlines=\maxdimen

\begin{document}

%%\begin{figure}
%%  \centering
%%  \begin{tikzpicture}
%%    \pgfplotsset
%%      {xmin = 0, y dir = reverse, height = 160mm,
%%       typeset ticklabels with strut,
%%       enlarge y limits = 0.02,
%%       cycle list = {},
%%     \input{t.tex}
%%  \end{tikzpicture}
%%\end{figure}

\begin{figure}
  \centering
  \begin{tikzpicture}
    \begin{axis}
        [xlabel = Implementation,
         xtick = data,
         x tick label style =
           { rotate = 60, anchor = north east, font = \sffamily },
         enlarge x limits = 0.02,
         ylabel = Time (ns/word),
         ymin = 0, yticklabel style = {/pgf/number format/.cd, 1000 sep = \,},
         legend cell align = left,
         width = 0.95 \textwidth,
         height = 0.60 \textheight,
         symbolic x coords =
           {c++-map, c++-uomap,
            golang,
            libavl-avl, libavl-pavl, libavl-rtavl, libavl-tavl,
            libavl-rb, libavl-prb, libavl-rtrb, libavl-trb,
            %lisp-ccl, lisp-clisp, lisp-cmucl, lisp-ecl,
            lisp-sbcl,
            mLib-sym,
            %perl, python,
            posix-hsearch1, posix-hsearchg, posix-tsearch,
            qptrie-qp-fanf, qptrie-qp-mdw, qptrie-qp-list,
            qptrie-fn-fanf, qptrie-fn-mdw, qptrie-fn-list,
            rust-btree, rust-hash,
            sgt-tree234,
            xyla-avl, xyla-rb, xyla-splay, xyla-treap}]
      \addplot+[sharp plot]
        table[x = impl, y = small] from {summary.dat};
      \addlegendentry{\textsf{small}}
      \addplot+[sharp plot]
        table[x = impl, y = medium] from {summary.dat};
      \addlegendentry{\textsf{medium}}
      \addplot+[sharp plot]
        table[x = impl, y = large] from {summary.dat};
      \addlegendentry{\textsf{large}}
      \addplot+[sharp plot]
        table[x = impl, y = huge] from {summary.dat};
      \addlegendentry{\textsf{huge}}
      \addplot+[sharp plot]
        table[x = impl, y = insane] from {summary.dat};
      \addlegendentry{\textsf{insane}}
    \end{axis}
  \end{tikzpicture}

  \caption{Performance of various associative mapping implementations}
  \label{fig:perf}
\end{figure}

\begin{table}
  \begin{tabular}[C]{llrr}                                         \hlx*{hv}
    \textbf{Dictionary}
      & \textbf{Filename}
      & \multicolumn{1}{c}{\textbf{Words}}
      & \multicolumn{1}{c}{\textbf{Bytes}}                      \\ \hlx{vhv}
    \textsf{small}      & \texttt{british-english-small}
                                &       50\,792 &      465\,516 \\
    \textsf{medium}     & \texttt{british-english}
                                &      101\,921 &      968\,222 \\
    \textsf{large}      & \texttt{british-english-large}
                                &      166\,747 &   1\,635\,703 \\
    \textsf{huge}       & \texttt{british-english-huge}
                                &      344\,817 &   3\,532\,576 \\
    \textsf{insane}     & \texttt{british-english-insane}
                                &      654\,276 &   6\,875\,495 \\ \hlx*{vh}
  \end{tabular}

  \caption{Dictionaries used in this experieent}
  \label{tab:dict}
\end{table}

\begin{table}
  \input{sumtab.tex}
  \caption{Performance of various associative mapping implementations.
    Entries show times in nanoseconds per word, followed by ranking in
    parentheses.}
  \label{tab:perf}
\end{table}

\end{document}
