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

chore(rln-wasm): Make rln-wasm stateless #266

Merged
merged 3 commits into from
Sep 16, 2024
Merged

Conversation

seemenkina
Copy link
Contributor

Regarding Release v0.6.0 in issue #263
Deprecate tree and correspond function from rln-wasm

Copy link

github-actions bot commented Sep 4, 2024

Benchmark for 8570926

Click to view benchmark
Test Base PR %
FullMerkleTree::compute_root 0.0±0.00ns 0.0±0.00ns NaN%
FullMerkleTree::delete 861.7±9.74ns 874.4±37.65ns +1.47%
FullMerkleTree::get 3.4±0.05ns 3.5±0.08ns +2.94%
FullMerkleTree::get_empty_leaves_indices 7.4±0.07ns 7.5±0.17ns +1.35%
FullMerkleTree::get_subtree_root 3.6±0.15ns 3.7±0.11ns +2.78%
FullMerkleTree::override_range 1361.4±6.90ns 1335.8±19.76ns -1.88%
FullMerkleTree::set 869.2±5.75ns 865.1±21.78ns -0.47%
OptimalMerkleTree::compute_root 1013.0±13.59ns 1024.7±15.48ns +1.15%
OptimalMerkleTree::delete 1014.1±5.39ns 1021.8±15.54ns +0.76%
OptimalMerkleTree::get 22.5±0.12ns 22.5±0.35ns 0.00%
OptimalMerkleTree::get_empty_leaves_indices 7.1±0.08ns 7.1±0.13ns 0.00%
OptimalMerkleTree::get_subtree_root 24.0±0.18ns 23.3±0.37ns -2.92%
OptimalMerkleTree::override_range 4.2±0.06µs 4.2±0.11µs 0.00%
OptimalMerkleTree::set 1009.7±13.55ns 1018.8±21.99ns +0.90%

Copy link

github-actions bot commented Sep 4, 2024

Benchmark for 8570926

Click to view benchmark
Test Base PR %
FullMerkleTree::::full_height_gen 13.7±0.08ms 13.7±0.50ms 0.00%
OptimalMerkleTree::::full_height_gen 575.5±6.07µs 577.4±13.22µs +0.33%
Pmtree::compute_root 0.0±0.00ns 0.0±0.00ns NaN%
Pmtree::get 323.5±3.14ns 347.2±8.39ns +7.33%
Pmtree::get_empty_leaves_indices 8.4±0.26ns 8.4±0.32ns 0.00%
Pmtree::get_subtree_root 475.5±8.54ns 477.6±10.97ns +0.44%
Pmtree::override_range 235.9±8.48µs 241.6±3.35µs +2.42%
Pmtree::set 54.2±1.14µs 53.9±0.91µs -0.55%
Pmtree:delete 53.9±0.63µs 53.8±0.36µs -0.19%
Set/FullMerkleTree::::set/1 556.2±3.41µs 555.1±6.24µs -0.20%
Set/FullMerkleTree::::set/10 5.6±0.21ms 5.6±0.13ms 0.00%
Set/FullMerkleTree::::set/100 55.7±1.37ms 55.3±0.23ms -0.72%
Set/FullMerkleTree::::set_range/1 554.7±3.18µs 554.8±6.22µs +0.02%
Set/FullMerkleTree::::set_range/10 753.9±3.85µs 755.0±14.02µs +0.15%
Set/FullMerkleTree::::set_range/100 3.3±0.01ms 3.3±0.01ms 0.00%
Set/OptimalMerkleTree::::set/1 558.1±4.29µs 558.5±10.69µs +0.07%
Set/OptimalMerkleTree::::set/10 5.6±0.18ms 5.6±0.04ms 0.00%
Set/OptimalMerkleTree::::set/100 56.0±1.48ms 55.8±0.62ms -0.36%
Set/OptimalMerkleTree::::set_range/1 557.3±2.62µs 558.7±7.86µs +0.25%
Set/OptimalMerkleTree::::set_range/10 5.6±0.25ms 5.6±0.33ms 0.00%
Set/OptimalMerkleTree::::set_range/100 55.8±0.32ms 55.5±0.16ms -0.54%
vk::vk_from_ark_serialized 1605.8±29.40ns 1576.2±14.32ns -1.84%
zkey::zkey_from_raw 3.4±0.01s 3.4±0.01s 0.00%

Copy link

Benchmark for 8ed8e84

Click to view benchmark
Test Base PR %
FullMerkleTree::compute_root 0.0±0.00ns 0.0±0.00ns NaN%
FullMerkleTree::delete 865.6±11.95ns 870.6±9.22ns +0.58%
FullMerkleTree::get 3.5±0.05ns 3.4±0.04ns -2.86%
FullMerkleTree::get_empty_leaves_indices 7.5±0.16ns 7.4±0.10ns -1.33%
FullMerkleTree::get_subtree_root 3.7±0.09ns 3.7±0.11ns 0.00%
FullMerkleTree::override_range 1344.2±22.49ns 1369.3±11.92ns +1.87%
FullMerkleTree::set 859.4±12.07ns 885.7±11.07ns +3.06%
OptimalMerkleTree::compute_root 1021.2±18.14ns 1038.6±6.23ns +1.70%
OptimalMerkleTree::delete 1021.5±23.21ns 1040.1±14.62ns +1.82%
OptimalMerkleTree::get 22.5±0.20ns 22.9±0.29ns +1.78%
OptimalMerkleTree::get_empty_leaves_indices 7.1±0.08ns 7.1±0.12ns 0.00%
OptimalMerkleTree::get_subtree_root 23.3±0.29ns 24.0±0.41ns +3.00%
OptimalMerkleTree::override_range 4.1±0.06µs 4.3±0.25µs +4.88%
OptimalMerkleTree::set 1015.0±15.30ns 1028.7±13.36ns +1.35%

Copy link

Benchmark for 8ed8e84

Click to view benchmark
Test Base PR %
FullMerkleTree::::full_height_gen 15.9±0.13ms 14.1±0.15ms -11.32%
OptimalMerkleTree::::full_height_gen 582.0±27.66µs 576.4±6.47µs -0.96%
Pmtree::compute_root 0.0±0.00ns 0.0±0.00ns NaN%
Pmtree::get 320.6±5.95ns 322.6±3.64ns +0.62%
Pmtree::get_empty_leaves_indices 8.4±0.11ns 8.4±0.13ns 0.00%
Pmtree::get_subtree_root 472.9±9.21ns 474.3±4.32ns +0.30%
Pmtree::override_range 238.0±3.60µs 241.0±3.11µs +1.26%
Pmtree::set 54.0±0.85µs 53.9±0.69µs -0.19%
Pmtree:delete 53.8±0.42µs 53.8±0.39µs 0.00%
Set/FullMerkleTree::::set/1 555.8±6.54µs 554.8±5.34µs -0.18%
Set/FullMerkleTree::::set/10 5.6±0.15ms 5.5±0.02ms -1.79%
Set/FullMerkleTree::::set/100 55.7±0.12ms 55.5±0.24ms -0.36%
Set/FullMerkleTree::::set_range/1 556.1±9.28µs 555.4±4.07µs -0.13%
Set/FullMerkleTree::::set_range/10 754.4±5.90µs 753.5±8.61µs -0.12%
Set/FullMerkleTree::::set_range/100 3.3±0.01ms 3.3±0.01ms 0.00%
Set/OptimalMerkleTree::::set/1 555.1±5.82µs 555.5±7.29µs +0.07%
Set/OptimalMerkleTree::::set/10 5.6±0.02ms 5.6±0.02ms 0.00%
Set/OptimalMerkleTree::::set/100 55.9±0.19ms 55.7±0.28ms -0.36%
Set/OptimalMerkleTree::::set_range/1 558.7±8.69µs 555.2±2.38µs -0.63%
Set/OptimalMerkleTree::::set_range/10 5.6±0.01ms 5.6±0.03ms 0.00%
Set/OptimalMerkleTree::::set_range/100 55.9±0.09ms 55.8±3.04ms -0.18%
vk::vk_from_ark_serialized 1653.3±11.43ns 1577.9±6.21ns -4.56%
zkey::zkey_from_raw 3.4±0.00s 3.4±0.01s 0.00%

rln/src/public.rs Outdated Show resolved Hide resolved
Copy link

Benchmark for 6480e05

Click to view benchmark
Test Base PR %
FullMerkleTree::compute_root 0.0±0.00ns 0.0±0.00ns NaN%
FullMerkleTree::delete 857.3±5.58ns 867.9±27.45ns +1.24%
FullMerkleTree::get 3.4±0.06ns 3.5±0.06ns +2.94%
FullMerkleTree::get_empty_leaves_indices 7.1±0.11ns 7.1±0.13ns 0.00%
FullMerkleTree::get_subtree_root 3.7±0.13ns 3.7±0.08ns 0.00%
FullMerkleTree::override_range 1343.7±12.74ns 1330.9±8.79ns -0.95%
FullMerkleTree::set 851.5±7.31ns 857.3±12.62ns +0.68%
OptimalMerkleTree::compute_root 1000.8±22.02ns 990.8±13.44ns -1.00%
OptimalMerkleTree::delete 989.3±9.26ns 994.6±22.83ns +0.54%
OptimalMerkleTree::get 22.2±0.29ns 22.2±0.44ns 0.00%
OptimalMerkleTree::get_empty_leaves_indices 7.1±0.17ns 7.1±0.11ns 0.00%
OptimalMerkleTree::get_subtree_root 23.8±0.40ns 23.9±0.41ns +0.42%
OptimalMerkleTree::override_range 4.1±0.06µs 4.1±0.19µs 0.00%
OptimalMerkleTree::set 985.9±8.26ns 988.2±16.46ns +0.23%

Copy link

Benchmark for 6480e05

Click to view benchmark
Test Base PR %
FullMerkleTree::::full_height_gen 14.8±0.56ms 14.1±0.18ms -4.73%
OptimalMerkleTree::::full_height_gen 576.8±8.80µs 579.6±4.15µs +0.49%
Pmtree::compute_root 0.0±0.00ns 0.0±0.00ns NaN%
Pmtree::get 328.7±3.17ns 334.3±3.76ns +1.70%
Pmtree::get_empty_leaves_indices 8.7±0.18ns 8.7±0.11ns 0.00%
Pmtree::get_subtree_root 480.6±2.82ns 486.7±8.34ns +1.27%
Pmtree::override_range 236.9±4.79µs 235.9±4.03µs -0.42%
Pmtree::set 54.7±0.86µs 54.4±1.16µs -0.55%
Pmtree:delete 54.1±0.62µs 54.2±0.71µs +0.18%
Set/FullMerkleTree::::set/1 555.7±3.92µs 552.4±7.31µs -0.59%
Set/FullMerkleTree::::set/10 5.6±0.01ms 5.6±0.03ms 0.00%
Set/FullMerkleTree::::set/100 55.6±0.25ms 55.5±1.46ms -0.18%
Set/FullMerkleTree::::set_range/1 555.7±2.82µs 555.3±12.64µs -0.07%
Set/FullMerkleTree::::set_range/10 753.3±3.65µs 751.7±6.99µs -0.21%
Set/FullMerkleTree::::set_range/100 3.3±0.01ms 3.2±0.02ms -3.03%
Set/OptimalMerkleTree::::set/1 554.3±6.28µs 554.6±2.68µs +0.05%
Set/OptimalMerkleTree::::set/10 5.5±0.01ms 5.6±0.04ms +1.82%
Set/OptimalMerkleTree::::set/100 55.7±0.18ms 55.5±0.24ms -0.36%
Set/OptimalMerkleTree::::set_range/1 556.5±7.99µs 558.2±8.79µs +0.31%
Set/OptimalMerkleTree::::set_range/10 5.6±0.01ms 5.5±0.04ms -1.79%
Set/OptimalMerkleTree::::set_range/100 55.9±0.16ms 55.8±0.20ms -0.18%
vk::vk_from_ark_serialized 1605.6±6.99ns 1623.7±22.44ns +1.13%
zkey::zkey_from_raw 3.4±0.00s 3.4±0.01s 0.00%

@seemenkina seemenkina merged commit 4a74ff0 into master Sep 16, 2024
10 checks passed
@seemenkina seemenkina deleted the rln_wasm_stateless branch September 16, 2024 05:55
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