Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(rln-wasm): run tests again #264

Merged
merged 4 commits into from
Aug 20, 2024
Merged

fix(rln-wasm): run tests again #264

merged 4 commits into from
Aug 20, 2024

Conversation

rymnc
Copy link
Contributor

@rymnc rymnc commented Aug 12, 2024

Fixes regression introduced in #241

Copy link

Benchmark for dc8bfc8

Click to view benchmark
Test Base PR %
FullMerkleTree::compute_root 0.0±0.00ns 0.0±0.00ns NaN%
FullMerkleTree::delete 863.0±15.68ns 863.4±12.14ns +0.05%
FullMerkleTree::get 3.4±0.04ns 3.4±0.07ns 0.00%
FullMerkleTree::get_empty_leaves_indices 7.4±0.06ns 7.4±0.12ns 0.00%
FullMerkleTree::get_subtree_root 3.7±0.18ns 3.6±0.12ns -2.70%
FullMerkleTree::override_range 1354.2±9.59ns 1451.9±6.74ns +7.21%
FullMerkleTree::set 875.0±4.52ns 867.4±7.60ns -0.87%
OptimalMerkleTree::compute_root 1013.9±10.71ns 1012.4±12.72ns -0.15%
OptimalMerkleTree::delete 1013.7±13.09ns 1015.0±15.10ns +0.13%
OptimalMerkleTree::get 22.5±0.27ns 22.5±0.44ns 0.00%
OptimalMerkleTree::get_empty_leaves_indices 7.4±0.18ns 7.4±0.14ns 0.00%
OptimalMerkleTree::get_subtree_root 24.0±0.20ns 24.0±0.31ns 0.00%
OptimalMerkleTree::override_range 4.3±0.52µs 4.2±0.06µs -2.33%
OptimalMerkleTree::set 1005.5±12.83ns 1007.5±8.39ns +0.20%

Copy link

Benchmark for dc8bfc8

Click to view benchmark
Test Base PR %
FullMerkleTree::::full_height_gen 14.1±0.23ms 15.3±0.13ms +8.51%
OptimalMerkleTree::::full_height_gen 575.0±6.33µs 574.8±4.02µs -0.03%
Pmtree::compute_root 0.0±0.00ns 0.0±0.00ns NaN%
Pmtree::get 320.2±4.07ns 322.6±2.93ns +0.75%
Pmtree::get_empty_leaves_indices 8.4±0.15ns 8.4±0.13ns 0.00%
Pmtree::get_subtree_root 484.9±6.37ns 489.2±4.17ns +0.89%
Pmtree::override_range 231.9±2.85µs 231.0±3.33µs -0.39%
Pmtree::set 54.4±0.56µs 54.4±0.60µs 0.00%
Pmtree:delete 54.9±0.32µs 54.6±0.32µs -0.55%
Set/FullMerkleTree::::set/1 555.2±2.12µs 555.2±5.67µs 0.00%
Set/FullMerkleTree::::set/10 5.5±0.01ms 5.5±0.02ms 0.00%
Set/FullMerkleTree::::set/100 55.6±0.41ms 55.5±0.10ms -0.18%
Set/FullMerkleTree::::set_range/1 553.1±6.08µs 556.5±8.72µs +0.61%
Set/FullMerkleTree::::set_range/10 756.1±6.72µs 755.9±8.05µs -0.03%
Set/FullMerkleTree::::set_range/100 3.3±0.01ms 3.3±0.03ms 0.00%
Set/OptimalMerkleTree::::set/1 557.4±6.74µs 555.4±5.42µs -0.36%
Set/OptimalMerkleTree::::set/10 5.6±0.01ms 5.6±0.01ms 0.00%
Set/OptimalMerkleTree::::set/100 56.0±0.07ms 55.5±0.11ms -0.89%
Set/OptimalMerkleTree::::set_range/1 559.4±6.30µs 554.7±6.49µs -0.84%
Set/OptimalMerkleTree::::set_range/10 5.6±0.01ms 5.5±0.02ms -1.79%
Set/OptimalMerkleTree::::set_range/100 55.9±0.09ms 55.5±0.11ms -0.72%
vk::vk_from_ark_serialized 1565.4±7.71ns 1569.7±18.53ns +0.27%
zkey::zkey_from_raw 3.4±0.00s 3.4±0.01s 0.00%

Copy link

Benchmark for c685703

Click to view benchmark
Test Base PR %
FullMerkleTree::compute_root 0.0±0.00ns 0.0±0.00ns NaN%
FullMerkleTree::delete 887.3±15.21ns 866.4±11.14ns -2.36%
FullMerkleTree::get 3.5±0.06ns 3.5±0.08ns 0.00%
FullMerkleTree::get_empty_leaves_indices 7.8±0.13ns 7.7±0.12ns -1.28%
FullMerkleTree::get_subtree_root 3.7±0.08ns 3.7±0.12ns 0.00%
FullMerkleTree::override_range 1335.9±20.22ns 1336.5±24.22ns +0.04%
FullMerkleTree::set 873.0±7.26ns 866.1±16.80ns -0.79%
OptimalMerkleTree::compute_root 1028.4±13.92ns 1017.5±25.17ns -1.06%
OptimalMerkleTree::delete 1032.4±7.25ns 1017.2±16.07ns -1.47%
OptimalMerkleTree::get 23.7±0.29ns 23.7±0.28ns 0.00%
OptimalMerkleTree::get_empty_leaves_indices 7.4±0.16ns 7.4±0.16ns 0.00%
OptimalMerkleTree::get_subtree_root 24.2±0.34ns 23.6±0.39ns -2.48%
OptimalMerkleTree::override_range 4.1±0.07µs 4.1±0.12µs 0.00%
OptimalMerkleTree::set 1032.7±11.38ns 1010.7±13.83ns -2.13%

Copy link

Benchmark for c685703

Click to view benchmark
Test Base PR %
FullMerkleTree::::full_height_gen 15.5±0.16ms 15.6±0.14ms +0.65%
OptimalMerkleTree::::full_height_gen 577.8±2.60µs 579.9±8.05µs +0.36%
Pmtree::compute_root 0.0±0.00ns 0.0±0.00ns NaN%
Pmtree::get 337.6±4.43ns 337.2±5.23ns -0.12%
Pmtree::get_empty_leaves_indices 8.4±0.05ns 8.4±0.14ns 0.00%
Pmtree::get_subtree_root 499.1±8.48ns 502.9±12.63ns +0.76%
Pmtree::override_range 230.5±4.98µs 245.9±5.95µs +6.68%
Pmtree::set 54.4±0.62µs 54.4±0.65µs 0.00%
Pmtree:delete 54.5±0.67µs 54.5±0.74µs 0.00%
Set/FullMerkleTree::::set/1 556.1±7.06µs 555.2±5.54µs -0.16%
Set/FullMerkleTree::::set/10 5.6±0.02ms 5.6±0.01ms 0.00%
Set/FullMerkleTree::::set/100 55.7±0.61ms 55.6±0.08ms -0.18%
Set/FullMerkleTree::::set_range/1 555.7±6.46µs 556.6±6.01µs +0.16%
Set/FullMerkleTree::::set_range/10 757.0±7.07µs 755.9±6.25µs -0.15%
Set/FullMerkleTree::::set_range/100 3.3±0.00ms 3.3±0.01ms 0.00%
Set/OptimalMerkleTree::::set/1 556.9±3.56µs 555.9±2.49µs -0.18%
Set/OptimalMerkleTree::::set/10 5.6±0.01ms 5.6±0.03ms 0.00%
Set/OptimalMerkleTree::::set/100 55.8±0.12ms 55.8±0.14ms 0.00%
Set/OptimalMerkleTree::::set_range/1 558.0±12.48µs 555.0±4.01µs -0.54%
Set/OptimalMerkleTree::::set_range/10 5.6±0.02ms 5.6±0.09ms 0.00%
Set/OptimalMerkleTree::::set_range/100 55.7±0.16ms 55.7±0.11ms 0.00%
vk::vk_from_ark_serialized 1629.8±5.77ns 1579.2±5.74ns -3.10%
zkey::zkey_from_raw 3.4±0.01s 3.4±0.01s 0.00%

Copy link

Benchmark for 0ab4384

Click to view benchmark
Test Base PR %
FullMerkleTree::compute_root 0.0±0.00ns 0.0±0.00ns NaN%
FullMerkleTree::delete 876.4±33.71ns 860.6±6.81ns -1.80%
FullMerkleTree::get 3.4±0.12ns 3.4±0.05ns 0.00%
FullMerkleTree::get_empty_leaves_indices 7.7±0.12ns 7.4±0.08ns -3.90%
FullMerkleTree::get_subtree_root 3.7±0.10ns 3.5±0.14ns -5.41%
FullMerkleTree::override_range 1335.8±19.73ns 1346.5±15.05ns +0.80%
FullMerkleTree::set 867.6±12.69ns 864.5±6.76ns -0.36%
OptimalMerkleTree::compute_root 1035.4±13.25ns 1013.5±7.99ns -2.12%
OptimalMerkleTree::delete 1017.4±6.08ns 1036.6±38.14ns +1.89%
OptimalMerkleTree::get 23.7±0.41ns 22.5±0.25ns -5.06%
OptimalMerkleTree::get_empty_leaves_indices 7.4±0.08ns 7.1±0.08ns -4.05%
OptimalMerkleTree::get_subtree_root 24.2±0.28ns 24.1±0.31ns -0.41%
OptimalMerkleTree::override_range 4.1±0.03µs 4.2±0.05µs +2.44%
OptimalMerkleTree::set 1012.3±12.22ns 1012.5±24.04ns +0.02%

@seemenkina
Copy link
Contributor

seemenkina commented Aug 19, 2024

in past PR the mismatch between serialisation and deserialisation (based on function names) has been corrected. Because the tests were not working it turned out that the functions were doing different things and I returned serialisation with big int to wasm, renamed it to a separate function so that there was no more such confusion

cc: @rymnc

Copy link

Benchmark for 27427ba

Click to view benchmark
Test Base PR %
FullMerkleTree::compute_root 0.0±0.00ns 0.0±0.00ns NaN%
FullMerkleTree::delete 860.6±11.42ns 859.5±11.91ns -0.13%
FullMerkleTree::get 3.4±0.03ns 3.4±0.08ns 0.00%
FullMerkleTree::get_empty_leaves_indices 7.7±0.09ns 7.4±0.13ns -3.90%
FullMerkleTree::get_subtree_root 3.7±0.09ns 3.7±0.11ns 0.00%
FullMerkleTree::override_range 1351.5±20.04ns 1344.4±17.95ns -0.53%
FullMerkleTree::set 871.4±11.20ns 867.0±12.03ns -0.50%
OptimalMerkleTree::compute_root 1004.8±19.25ns 1016.3±27.82ns +1.14%
OptimalMerkleTree::delete 1003.7±14.68ns 1015.3±12.21ns +1.16%
OptimalMerkleTree::get 23.7±0.28ns 22.9±0.52ns -3.38%
OptimalMerkleTree::get_empty_leaves_indices 7.4±0.04ns 7.1±0.06ns -4.05%
OptimalMerkleTree::get_subtree_root 24.2±0.28ns 24.1±0.31ns -0.41%
OptimalMerkleTree::override_range 4.1±0.07µs 4.2±0.16µs +2.44%
OptimalMerkleTree::set 1000.1±23.84ns 1009.7±13.14ns +0.96%

Copy link

Benchmark for 27427ba

Click to view benchmark
Test Base PR %
FullMerkleTree::::full_height_gen 16.2±0.59ms 15.2±0.61ms -6.17%
OptimalMerkleTree::::full_height_gen 582.2±7.06µs 577.5±8.24µs -0.81%
Pmtree::compute_root 0.0±0.00ns 0.0±0.00ns NaN%
Pmtree::get 325.5±3.65ns 326.9±5.29ns +0.43%
Pmtree::get_empty_leaves_indices 8.4±0.15ns 8.4±0.19ns 0.00%
Pmtree::get_subtree_root 505.9±7.02ns 472.4±3.73ns -6.62%
Pmtree::override_range 245.5±7.91µs 243.1±4.15µs -0.98%
Pmtree::set 54.4±0.46µs 54.4±0.52µs 0.00%
Pmtree:delete 54.4±0.71µs 54.4±0.84µs 0.00%
Set/FullMerkleTree::::set/1 554.9±7.00µs 556.4±9.07µs +0.27%
Set/FullMerkleTree::::set/10 5.5±0.01ms 5.5±0.04ms 0.00%
Set/FullMerkleTree::::set/100 55.7±0.23ms 55.6±0.18ms -0.18%
Set/FullMerkleTree::::set_range/1 556.5±6.76µs 555.3±5.83µs -0.22%
Set/FullMerkleTree::::set_range/10 756.5±11.05µs 754.0±5.90µs -0.33%
Set/FullMerkleTree::::set_range/100 3.3±0.01ms 3.3±0.01ms 0.00%
Set/OptimalMerkleTree::::set/1 556.8±7.25µs 554.1±4.14µs -0.48%
Set/OptimalMerkleTree::::set/10 5.6±0.01ms 5.6±0.01ms 0.00%
Set/OptimalMerkleTree::::set/100 55.7±0.13ms 55.6±0.24ms -0.18%
Set/OptimalMerkleTree::::set_range/1 557.9±6.50µs 555.7±3.50µs -0.39%
Set/OptimalMerkleTree::::set_range/10 5.7±0.02ms 5.6±0.02ms -1.75%
Set/OptimalMerkleTree::::set_range/100 55.7±0.12ms 55.6±0.08ms -0.18%
vk::vk_from_ark_serialized 1572.7±19.46ns 1673.2±19.11ns +6.39%
zkey::zkey_from_raw 3.4±0.00s 3.4±0.00s 0.00%

@rymnc
Copy link
Contributor Author

rymnc commented Aug 19, 2024

lgtm

@seemenkina seemenkina self-assigned this Aug 20, 2024
@seemenkina seemenkina merged commit c4579e1 into master Aug 20, 2024
10 checks passed
@seemenkina seemenkina deleted the fix-wasm-tests branch August 20, 2024 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants