Initial notes

We are using the code at https://github.com/logos-co/semiavidpr-experiments repo

Code was cleaned after forking. Improving performance between 15-20%

The repository is not meant to work specifically for 2D RS, but we can leverage the numbers of the benchmarks to understand the cost of computing what we need.

We are aiming for a 32MB block size. So we take that size as the target for measuring encoding and commitments.

Benchmarking hardware

Intel core i9-12900K, 32GB DDR5 Ram

On Reed Solomon

In the original code they are just supposed to encode and extend the original matrix rows doubling them. In our case we need to do that per column extending the matrix vertically (doubling it) and then do it so per row to have a completely extended and rs encoded 2D matrix.

A base encoding to doubling the original matrix for the target of 32MB block takes about 260ms in the above hardware.

Benchmarking Bls12_381/disperse_encode_rows/n=1024 L=1024, s=33.292288MB: Collecting 10 samples in estimated 5.1712 s (20 iterations)
Benchmarking Bls12_381/disperse_encode_rows/n=1024 L=1024, s=33.292288MB: Analyzing
Bls12_381/disperse_encode_rows/n=1024 L=1024, s=33.292288MB
                        time:   [253.83 ms 257.70 ms 263.20 ms]
                        thrpt:  [120.63 MiB/s 123.21 MiB/s 125.08 MiB/s]

Notes: n is original matrix elements, L is the extended size (2n).

We need to do this process 3 times, to have a fully expanded 2d matrix. With gives us an approximated time of 800ms in a kind of beefy machine.