The following benchmarks compare three different commitment schemes: Merkle Tree with LDE, Pedersen Commitments, and Ajtai Hash-based Commitments. These benchmarks were performed on:
CPU: Intel i7-12700F (single core)
RAM: 32GB
OS: Linux(Archlinux)
Repository: https://github.com/NethermindEth/commitment-schemes-comparison
Each scheme was tested with varying configurations:
These benchmarks were conducted using the Goldilocks field (modulus 2^64 - 2^32 + 1),
Witness length | Blow-up factor | LDE time | Commit time |
---|---|---|---|
2^16 | 2 | 4.4ms | 51.6ms |
2^16 | 4 | 7.5ms | 103.1ms |
2^16 | 8 | 13.0ms | 206.0ms |
2^17 | 2 | 11.3ms | 103.0ms |
2^17 | 4 | 16.4ms | 206.2ms |
2^17 | 8 | 27.4ms | 412.3ms |
2^18 | 2 | 25.1ms | 206.2ms |
2^18 | 4 | 35.05ms | 412.5ms |
2^18 | 8 | 63.3ms | 824.1ms |
2^19 | 2 | 52.6ms | 412.6ms |
2^19 | 4 | 76.1ms | 825.0ms |
2^29 | 8 | 137.7ms | 1653.0ms |
2^20 | 2 | 109.7ms | 824.5ms |
2^20 | 4 | 168.7ms | 1651.8ms |
2^20 | 8 | 311.9ms | 3.3s |
Witness length | Blow-up factor | LDE time | Commit time |
---|---|---|---|
2^16 | 2 | 4.3ms | 530.3ms |
2^16 | 4 | 7.5ms | 1060.6ms |
2^16 | 8 | 13.0ms | 2.1s |
2^17 | 2 | 11.3ms | 1063.0ms |
2^17 | 4 | 16.3ms | 2.1s |
2^17 | 8 | 27.5ms | 4.2s |
2^18 | 2 | 25.0ms | 2.1s |
2^18 | 4 | 35.3ms | 4.2s |
2^18 | 8 | 60.3ms | 8.5s |
2^19 | 2 | 52.5ms | 4.2s |
2^19 | 4 | 74.1ms | 8.5s |
2^29 | 8 | 137.8ms | 17.1s |
2^20 | 2 | 107.3ms | 8.5s |
2^20 | 4 | 167.7ms | 17.0s |
2^20 | 8 | 310.5ms | 33.9s |
Witness length | Blow-up factor | LDE time | Commit time |
---|---|---|---|
2^16 | 2 | 4.3m | 227.9ms |
2^16 | 4 | 7.5ms | 455.8ms |
2^16 | 8 | 13.0ms | 912.3ms |
2^17 | 2 | 11.3ms | 456.1ms |
2^17 | 4 | 16.3ms | 911.4ms |
2^17 | 8 | 27.6ms | 1823.2ms |
2^18 | 2 | 25.1ms | 912.2ms |
2^18 | 4 | 35.0ms | 1822.6ms |
2^18 | 8 | 62.1ms | 3.6s |
2^19 | 2 | 52.6ms | 1823.6ms |
2^19 | 4 | 76.1ms | 3.6s |
2^29 | 8 | 137.9ms | 7.3s |
2^20 | 2 | 109.1ms | 3.6s |
2^20 | 4 | 165.7ms | 7.3s |
2^20 | 8 | 312.3ms | 14.6s |
Witness length | Witness type | Commit time |
---|---|---|
2^16 | 1 in all entries | 19.3ms |
2^16 | (Mod -1)/2 in all entries | 132.1ms |
2^16 | Random witness | 305.3ms |
2^17 | 1 in all entries | 39.0ms |
2^17 | (Mod -1)/2 in all entries | 256.3ms |
2^17 | Random witness | 589.9ms |
2^18 | 1 in all entries | 89.5ms |
2^18 | (Mod -1)/2 in all entries | 469.2ms |
2^18 | Random witness | 1142.5ms |
2^19 | 1 in all entries | 179.6ms |
2^19 | (Mod -1)/2 in all entries | 931.7ms |
2^19 | Random witness | 2.1s |
2^20 | 1 in all entries | 345.8ms |
2^20 | (Mod -1)/2 in all entries | 1846.1ms |
2^20 | Random witness | 4.1s |