\section{Benchmarks}
\begin{frame}
    \frametitle{Testing and Benchmarks}
    
    \begin{itemize}
        \setlength\itemsep{1.5em}
        \item Automated generated oware instances
        \item Tests can be reproduced with same seed
        \item Tests compare to original program
        \item Automated via scripts
        \item Codequality via warning flags
    \end{itemize}
\end{frame}

\begin{frame}
    \frametitle{Benchmarks - Setup}
    
    \begin{itemize}
        \setlength\itemsep{1.5em}
        \item \textbf{Number of test instances:} 50
        \item \textbf{OS Version:} Debian 9, Linux Kernel version 4.9.0
        \item \textbf{GCC Version:} 6.3.0
        \item \textbf{CPU:} Intel(R) Xeon(R) CPU E31220 @ 3.10GHz (4 cores)
        \item \textbf{Number of test instances:} 50
        \item \textbf{Compilation flags:} -O3
    \end{itemize}
\end{frame}


\begin{frame}
    \frametitle{Benchmarks - Original/Alpha-Beta}
    \centerline{\includegraphics[width=\linewidth]{../bench_results_opts/graphics/alphabeta-stats.png}}
\end{frame}

\begin{frame}
    \frametitle{Benchmarks - Original/Opt-oware}

    \centerline{\includegraphics[width=\linewidth]{../bench_results_opts/graphics/opt_oware-stats.png}}
    
\end{frame}

\begin{frame}
    \frametitle{Benchmarks - Alpha-Beta/OpenMP}

    \centerline{\includegraphics[width=\linewidth]{../bench_results_opts/graphics/openmp-stats.png}}
    
\end{frame}

\begin{frame}
    \frametitle{Benchmarks - Alpha-Beta/Profiling}

    \centerline{\includegraphics[width=\linewidth]{../bench_results_opts/graphics/profile-stats.png}}
    
\end{frame}

\begin{frame}
    \frametitle{Benchmarks - Alpha-Beta/Table}

    \centerline{\includegraphics[width=\linewidth]{../bench_results_opts/graphics/table-stats.png}}
    
\end{frame}

\begin{frame}
    \frametitle{Benchmarks - Collected Stats}

    \centerline{\includegraphics[width=\linewidth]{../bench_results_opts/graphics/collected-stats.png}}
    
\end{frame}


\begin{frame}
    \frametitle{Benchmarks - Scaling}

    \centerline{\includegraphics[width=\linewidth]{../bench_results_opts/graphics/collected.png}}
    
\end{frame}


\begin{frame}
    \frametitle{Benchmarks - Overview}
  \resizebox{\linewidth}{!}{% Resize table to fit within \linewidth horizontally
  \begin{tabular}{|l|l|l|l|l|l|l|l|}
\hline
\textbf{optimization} & \textbf{cycles}   & \textbf{instructions} & \textbf{instruction/cycle} & \textbf{branches} & \textbf{branch-misses} & \textbf{misses/branches} & \textbf{time} \\ \hline
\textbf{alphabeta}    & 6,013,453,676  & 12,170,956,782     & 2.02                       & 2,070,344,913  & 87,272,090          & 4.22\%                   & 1.832   \\ \hline
\textbf{openmp}       & 14,712,533,778 & 28,813,657,365     & 1.96                       & 4,878,496,142  & 202,890,056         & 4.16\%                   & 1.685   \\ \hline
\textbf{opt\_oware}   & 5,296,750,490  & 12,837,914,926     & 2.42                       & 1,217,572,091  & 42,045,841          & 3.45\%                   & 1.622   \\ \hline
\textbf{profile}      & 5,106,006,248  & 9,759,299,468      & 1.91                       & 1,606,655,027  & 92,851,070          & 5.78\%                   & 1.582   \\ \hline
\textbf{table}        & 7,867,361,553  & 15,984,091,676     & 2.03                       & 2,840,728,195  & 86,013,593          & 3.03\%                   & 2.402   \\ \hline
\end{tabular}
  }
\end{frame}

\begin{frame}
    \frametitle{Further insights}
    \begin{itemize}
        \item \emph{MFLOPs/s:} 0.0001
        \item \emph{L3 Data Volume (Gbytes):} 0.1941
        \item \emph{Arithmetic Intensity:} 4.3E-05 FLOPs/Byte
        \item \emph{Bandwidth:} 11.16 GB/s
        \item \emph{Attained:} 0.00048 GB/s (0.02%)
        \item \textrightarrow Biggest amount of time spent on integer operations
        \item \textrightarrow Most of the tree seems to stay inside of the CPU memory
    \end{itemize}
\end{frame}