Manta-Network/zprize-wasm-msm

Improving MSM performance by tuning bucket size

Opened this issue · 0 comments

A well-known parameter for MSM performance is the bucket size. We are currently using the following bucket size:

const pTSizes = module.alloc([
            17, 17, 17, 17, 17, 17, 17, 17,
            17, 17, 16, 16, 15, 14, 13, 13,
            12, 11, 10, 9, 8, 7, 7, 6,
            5, 4, 3, 2, 1, 1, 1, 1
        ]);

We borrowed this table size from Wasmcurves, which might not be optimal once we have both batch affine and Pippenger.

We need to manually tune the bucket size to achieve optimal performance.

We note that we only need to tune for size between 2^14~2^19 for zprize.