Page MenuHomec4science

performance.tex
No OneTemporary

File Metadata

Created
Mon, Feb 24, 00:24

performance.tex

\section{Performance Benchmarks}
\label{app:benchmarks}
To benchmark the performance of the code, computation of four- and five-dimensional square matrices $\tensor{A^{(4)}}$ and $\tensor{A^{(5)}}$ of side $S+1$, such that $(\tensor{A^{(4)}})_{lkpj}=T_{lk}^{pj}$ and $(\tensor{A^{(5)}})_{lkmpj}=T_{lkm}^{pj}$, is considered, where the index is taken as starting from zero.
This benchmark is run for various versions of the code, and the time to solution, $t$, is measured in seconds. The results are presented in \cref{fig:benchmark}.
The code is managed with the Git version control system, and the first characters of the SHA1 commit checksum are used to label the different versions of the code.
All Fortran benchmarks include an output of the computed coefficients to the disk, which affect performance for small problem sizes (particularly visible in \cref{subfig:benchmark4}). Each version has its own specificities:
\begin{itemize}
\item \emph{Mathematica} Implements \cref{eq:T4lorenzo} for the $T_{lk}^{pj}$ coefficients and \cref{eq:t5jorge} for $T_{lkm}^{pj}$.
\item \emph{Mathematica New} Implements \cref{eq:t5stenger} for the $T_{lkm}^{pj}$ coefficients.
\item \emph{73f3d2e} Implements \cref{eq:T4lorenzo} in FP arithmetic Fortran. The intrinsic \lstinline{gamma} function is used to compute factorials and binomials.
\item \emph{1e91750} Implements of \cref{eq:T4lorenzo,eq:t5jorge} in FP Fortran using a custom factorial function with cache for half-integers and positive integers.
\item \emph{875839a} Is identical to ``1e91750'', but replaces double precision with quadruple precision variables.
\item \emph{36b3b7a} Implements \cref{eq:T4lorenzo,eq:t5jorge} in MP arithmetic Fortran using \num{50} significant digits, with similar features as ``1e91750''.
\item \emph{74c1d49} Optimizes version ``36b3b7a'' by implementing postulates \labelcref{eq:t4postulate,eq:t5postulate} and more strict loop limits.
\end{itemize}
\begin{figure}[htp]
\centering
\begin{subfigure}{\linewidth}
\centering
\includegraphics[width=\linewidth]{figs/perf4.png}
\subcaption{Benchmark for computing $T_{lk}^{pj}$ coefficients}
\label{subfig:benchmark4}
\end{subfigure}
\par\bigskip
\begin{subfigure}{\linewidth}
\centering
\includegraphics[width=\linewidth]{figs/perf5.png}
\subcaption{Benchmark for computing $T_{lkm}^{pj}$ coefficients}
\label{subfig:benchmark5}
\end{subfigure}
\caption{Performance benchmark of Mathematica and Fortran based computation of coefficients $T_{lk}^{pj}$ and $T_{lkm}^{pj}$. Specificities of each version can be found in the text.}
\label{fig:benchmark}
\end{figure}

Event Timeline