mirror of
https://github.com/lux-apps/papers.git
synced 2026-10-30 18:15:21 +00:00
Ringtail (Boschini et al., ePrint 2024/1113) is third-party prior art; Lux's Corona (Ring-LWE = Module-LWE rank-1) builds on it; Pulsar is Module-LWE rank-k. Retired the conflated boschini2024corona/corona2024/coronago/... bib keys to the single canonical ringtail/corona/pulsar/magnetar keys, rewrote \cite + \bibitem by context, and fixed 'Pulsar (Ring-LWE)' mislabels (Corona where corona.metal/ single-ring/Ringtail-derived; Pulsar where Module-LWE rank-k/ML-DSA). Cryptographer-led.
110 lines
4.4 KiB
TeX
110 lines
4.4 KiB
TeX
% sections/bench.tex -- bench projections per surface
|
|
\section{Bench projections}
|
|
\label{sec:bench}
|
|
|
|
All measured numbers in this section come from in-tree benchmarks,
|
|
not vendor marketing. Headline ratios reproduce on commodity Apple
|
|
silicon (M-class, $10$ performance cores, Go~1.26).
|
|
|
|
\subsection{Measured baseline (ZAP vs alternatives)}
|
|
|
|
From \texttt{lux/zap/README.md}~\cite{zapreadme}, core operations:
|
|
|
|
\begin{center}
|
|
\begin{tabular}{lrrr}
|
|
\toprule
|
|
\textbf{Op} & \textbf{ns/op} & \textbf{B/op} & \textbf{allocs/op} \\
|
|
\midrule
|
|
\texttt{BenchmarkZAPParse-10} & 2.9 & 0 & 0 \\
|
|
\texttt{BenchmarkZAPBuild-10} & 44.0 & 0 & 0 \\
|
|
\texttt{BenchmarkConsensusRound-10} & 5.5 & 0 & 0 \\
|
|
\bottomrule
|
|
\end{tabular}
|
|
\end{center}
|
|
|
|
ZAP versus MCP JSON-RPC (tool calling, 20-tool orchestrator):
|
|
|
|
\begin{center}
|
|
\begin{tabular}{lrrr}
|
|
\toprule
|
|
\textbf{Metric} & \textbf{MCP JSON-RPC} & \textbf{ZAP} & \textbf{Improvement} \\
|
|
\midrule
|
|
Serialisation & 5{,}579~ns/op & 322~ns/op & $\bm{17\times}$ \\
|
|
Memory per call & 2{,}826~B & 256~B & $\bm{11\times}$ \\
|
|
Allocations per op & 58 & 2 & $\bm{29\times}$ \\
|
|
Parse time & $\sim$1{,}000~ns & 2.9~ns & $\bm{345\times}$ \\
|
|
GC runs per 50K ops & 41 & 3 & $\bm{14\times}$ \\
|
|
\bottomrule
|
|
\end{tabular}
|
|
\end{center}
|
|
|
|
Full 100K-operation memory profile: $304.01$~MB$\to$$26.70$~MB total
|
|
allocated ($91.2\%$ reduction); $6{,}001{,}513$$\to$$200{,}003$ mallocs
|
|
($96.7\%$ reduction). These are reproducible on the bench in
|
|
\texttt{lux/zap/bench/main.go}.
|
|
|
|
\subsection{LP-023 P-Chain measured delta}
|
|
|
|
The \texttt{vms/platformvm/txs/zap\_native/} subtree benchmarks
|
|
report $7.50\times$ Parse geomean over \texttt{linearcodec}, single
|
|
allocation of $24$~B versus $3$--$7$ allocations of $120$--$536$~B,
|
|
per memory \texttt{LP-023 P-chain ZAP-native}~\cite{lp023zapnative}.
|
|
That is the empirical floor for projecting blockchain wire migrations
|
|
in this paper.
|
|
|
|
\subsection{Magnetar v1.1 strict-atom delta}
|
|
|
|
Independent confirmation from the threshold-signing stack: Magnetar
|
|
v1.1.0 strict-atom is measured $35$--$51\%$ faster than the circl
|
|
SHAKE-192s baseline at byte identity, per memory
|
|
\texttt{magnetar\_v110\_strict\_atom}~\cite{magnetar}. The
|
|
mechanism is the same: zero-allocation segment-pointer decode
|
|
replacing reflect-driven copy.
|
|
|
|
\subsection{Projected per-surface delta}
|
|
|
|
We project the LP-023 $7.50\times$ Parse geomean onto every Tier-1
|
|
blockchain-wire surface (P-Chain, X-Chain, UTXO, warp message,
|
|
proposerVM, chain VMs). For each AI/ML Tier-1 surface we project the
|
|
ZAP-vs-JSON-RPC $17\times$ serialisation / $345\times$ parse / $96.7\%$
|
|
allocation ratio.
|
|
|
|
\begin{center}
|
|
\begin{tabular}{lll}
|
|
\toprule
|
|
\textbf{Surface (Tier 1)} & \textbf{Current op cost} & \textbf{Projected} \\
|
|
\midrule
|
|
P-Chain tx parse & $\sim$$1.0$~\textmu s & $\sim$$130$~ns ($7.5\times$) \\
|
|
X-Chain UTXO parse & $\sim$$0.8$~\textmu s & $\sim$$105$~ns ($7.5\times$) \\
|
|
Warp message verify & $\sim$$2.3$~\textmu s & $\sim$$300$~ns ($7.5\times$) \\
|
|
Agent tool call ser & $5{,}579$~ns & $322$~ns ($17\times$) \\
|
|
Agent tool call parse & $\sim$$1{,}000$~ns & $2.9$~ns ($345\times$) \\
|
|
MCP per-call alloc & $58$ allocs & $2$ allocs ($29\times$) \\
|
|
\bottomrule
|
|
\end{tabular}
|
|
\end{center}
|
|
|
|
\paragraph{Stack-wide compounding.}
|
|
On a hypothetical RPC-heavy synthetic transaction~--- one P-Chain tx
|
|
verify, two X-Chain UTXO parses, one warp message verify, four agent
|
|
tool calls, two MCP round-trips~--- the current end-to-end CPU cost
|
|
sums to roughly $26$--$30$~\textmu s. The projection sums to roughly
|
|
$3.5$~\textmu s, a $\bm{7.4\text{--}8.6\times}$ compounded speedup
|
|
across the AI/ML/blockchain path. The allocation reduction is more
|
|
extreme: roughly $238$~allocations~$\to$~$\sim$$10$~allocations, a
|
|
$\bm{24\times}$ reduction translating directly to GC pressure
|
|
relief and tail-latency floor improvement.
|
|
|
|
\paragraph{Caveats.}
|
|
These projections assume each surface's wire cost dominates its own
|
|
op latency. For surfaces where wire is a minority of total work (e.g.
|
|
ML-DSA verification at $\sim$$600$~\textmu s end-to-end where wire is
|
|
$\sim$$5\%$), the projected speedup is dampened by Amdahl. Wire-bound
|
|
hot paths (block parsing, tool-call orchestration, tensor-stream
|
|
demux) realise the full ratio.
|
|
|
|
\paragraph{Confidence.}
|
|
Strong on (1)--(4): same code shape as already-measured surfaces.
|
|
Weak on Jin tensor wire: schema is not yet specced. Listed as
|
|
\emph{projection pending schema}.
|