You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When computing the aggregated KZG proof, a good chunk of the runtime is
spent on the barycentric evaluation. The most expensive operation during
the polynomial evaluation is the modular inverse as we divide the
polynomial by each root of unity (scaled by z).
We precompute the moduular inverses of each divisor as a batch to
speed up evaluation. This yields gives us a 3x improvement in the
latency of verifying blob transactions:
Before
```
go test -benchmem -run='^$' -bench '^BenchmarkVerifyMultiple$' github.com/ethereum/go-ethereum/tests
goos: linux
goarch: amd64
pkg: github.com/ethereum/go-ethereum/tests
cpu: AMD Ryzen 7 3700X 8-Core Processor
BenchmarkVerifyMultiple/8-6 5 216293524 ns/op 23122608 B/op 432644 allocs/op
BenchmarkVerifyMultiple/16-6 3 429942571 ns/op 46245757 B/op 865270 allocs/op
PASS
ok github.com/ethereum/go-ethereum/tests 33.350s
```
After:
```
go test -benchmem -run='^$' -bench '^BenchmarkVerifyMultiple$' github.com/ethereum/go-ethereum/tests
goos: linux
goarch: amd64
pkg: github.com/ethereum/go-ethereum/tests
cpu: AMD Ryzen 7 3700X 8-Core Processor
BenchmarkVerifyMultiple/8-6 16 69890960 ns/op 25221325 B/op 399904 allocs/op
BenchmarkVerifyMultiple/16-6 8 138506286 ns/op 50439658 B/op 799792 allocs/op
PASS
ok github.com/ethereum/go-ethereum/tests 20.170s
```
0 commit comments