mirror of
https://github.com/lux-apps/papers.git
synced 2026-10-30 18:15:21 +00:00
Restructured from flat .tex/.pdf files into per-paper subdirectories. Added Antje Worring as co-author on all papers. Synced PDFs to pdfs/ for download site.
67 lines
2.1 KiB
TeX
67 lines
2.1 KiB
TeX
\section{Profiling: The Signature Bottleneck}
|
|
|
|
|
|
\subsection{Time Breakdown}
|
|
|
|
Profiling the Go EVM on 10{,}000 ETH transfer transactions reveals:
|
|
|
|
\begin{table}[h]
|
|
\centering
|
|
\small
|
|
\begin{tabular}{lrrr}
|
|
\toprule
|
|
\textbf{Phase} & \textbf{Time} & \textbf{Fraction} & \textbf{Parallelizable?} \\
|
|
\midrule
|
|
secp256k1 ecrecover & 334\,ms & \textbf{87\%} & Yes (embarrassingly) \\
|
|
EVM execution & 51\,ms & 13\% & Partially (Block-STM) \\
|
|
\midrule
|
|
\textbf{Total} & 385\,ms & 100\% & --- \\
|
|
\bottomrule
|
|
\end{tabular}
|
|
\caption{Go EVM block processing time breakdown. 10{,}000 ETH transfers,
|
|
Apple M1 Max. ecrecover dominates at 87\%.}
|
|
\label{tab:profile}
|
|
\end{table}
|
|
|
|
\subsection{Amdahl's Law Analysis}
|
|
|
|
This profiling result fundamentally changes the optimization calculus:
|
|
|
|
\begin{itemize}
|
|
\item \textbf{5$\times$ faster EVM interpreter} (C++ evmone) applied to the 13\% that is
|
|
EVM time:
|
|
$\frac{1}{0.87 + 0.13/5} = 1.12\times$ overall.
|
|
\item \textbf{7.1$\times$ faster ecrecover} (parallel CPU) applied to the 87\% that is
|
|
signature time:
|
|
$\frac{1}{0.87/7.1 + 0.13} = 3.76\times$ overall.
|
|
\end{itemize}
|
|
|
|
Optimizing ecrecover yields \textbf{33.6$\times$ more impact per engineering hour} than
|
|
optimizing the EVM interpreter.
|
|
|
|
\subsection{Parallel ecrecover}
|
|
|
|
Parallelizing secp256k1 ecrecover across 10 CPU cores (Apple M1 Max):
|
|
|
|
\begin{table}[h]
|
|
\centering
|
|
\small
|
|
\begin{tabular}{lrrl}
|
|
\toprule
|
|
\textbf{Configuration} & \textbf{Time} & \textbf{Speedup} & \textbf{Notes} \\
|
|
\midrule
|
|
Sequential (1 core) & 334\,ms & 1.0$\times$ & Baseline \\
|
|
Parallel (10 cores) & 47\,ms & 7.1$\times$ & Measured \\
|
|
\midrule
|
|
\multicolumn{4}{l}{\textit{End-to-end impact (10k ETH transfers):}} \\
|
|
Sequential total & 385\,ms & --- & 51ms EVM + 334ms sig \\
|
|
Parallel ecrecover & 98\,ms & 3.9$\times$ & 51ms EVM + 47ms sig \\
|
|
\bottomrule
|
|
\end{tabular}
|
|
\caption{Parallel ecrecover on 10 CPU cores. 10{,}000 transactions.
|
|
ecrecover is embarrassingly parallel---each signature is independent.
|
|
The 7.1$\times$ speedup on 10 cores reflects $\sim$71\% parallel efficiency.}
|
|
\label{tab:ecrecover}
|
|
\end{table}
|
|
|