snarkVM
snarkVM copied to clipboard
[Perf] Use SmallVec in the LinearCombination
Despite the tiny diff and the somewhat conservative approach, this change has a large impact on deployment+execution runs. In a local test run using the tx cannon, --dev nodes, and a large transaction, it decreased the allocs/s in the target node by ~32%; it also made the 33-64B "allocation bucket" much less of an outlier in terms of the alloc count, which should improve the performance of specialized allocators like jemalloc.
I'm marking this PR as a draft, as I'd like to double-check it with a devnet run first.