crate-crypto / go-eth-kzg

Apache License 2.0
29 stars 22 forks source link

Simpler 4844 prove method #96

Open kevaundray opened 1 month ago

kevaundray commented 1 month ago

Previously I was against changing the 4844 code due to it already been auditted, however the code has changed quite a lot since we added 7594 methods, so it may be feasible to change that code given it will likely need to be auditted again.

kevaundray commented 1 month ago

Testing the difference:

BenchmarkOpenMonomial-10             100      10691245 ns/op      406979 B/op        180 allocs/op
BenchmarkOpenLagrange-10             124      10653541 ns/op      799451 B/op        163 allocs/op

Lagrange is what we currently do and monomial is the change proposed. The difference here is 10.69 vs 10.65 milliseconds

kevaundray commented 1 month ago

Strangely open monomial uses ~49% less memory

kevaundray commented 1 month ago

Higher level benchmarks have been collected in #97, #98, #99