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

Improve performance using parallelized iter #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Neylix
Copy link
Member

@Neylix Neylix commented Oct 31, 2024

Improve performance using par_iter from rayon lib.
Benchmark on aggregate_public_keys
Same performance gain on aggregate_signatures

##### With input 1 #####
Name                                ips        average  deviation         median         99th %
aggregate parallel iter          2.29 K      436.72 μs     ±7.22%      430.67 μs      583.51 μs
aggregate sequential iter        2.25 K      445.18 μs     ±4.52%      443.94 μs      471.41 μs

Comparison:
aggregate parallel iter          2.29 K
aggregate sequential iter        2.25 K - 1.02x slower +8.45 μs

##### With input 3 #####
Name                                ips        average  deviation         median         99th %
aggregate parallel iter          1.66 K        0.60 ms    ±23.47%        0.54 ms        1.01 ms
aggregate sequential iter        0.79 K        1.27 ms     ±4.82%        1.26 ms        1.33 ms

Comparison:
aggregate parallel iter          1.66 K
aggregate sequential iter        0.79 K - 2.11x slower +0.67 ms

##### With input 5 #####
Name                                ips        average  deviation         median         99th %
aggregate parallel iter          1.21 K        0.82 ms    ±23.77%        0.92 ms        1.06 ms
aggregate sequential iter        0.48 K        2.08 ms     ±0.94%        2.07 ms        2.14 ms

Comparison:
aggregate parallel iter          1.21 K
aggregate sequential iter        0.48 K - 2.52x slower +1.25 ms

##### With input 10 #####
Name                                ips        average  deviation         median         99th %
aggregate parallel iter          955.18        1.05 ms     ±8.59%        1.03 ms        1.50 ms
aggregate sequential iter        243.30        4.11 ms     ±0.84%        4.11 ms        4.22 ms

Comparison:
aggregate parallel iter          955.18
aggregate sequential iter        243.30 - 3.93x slower +3.06 ms

##### With input 50 #####
Name                                ips        average  deviation         median         99th %
aggregate parallel iter          261.52        3.82 ms     ±6.92%        3.77 ms        4.52 ms
aggregate sequential iter         49.07       20.38 ms     ±0.63%       20.35 ms       21.11 ms

Comparison:
aggregate parallel iter          261.52
aggregate sequential iter         49.07 - 5.33x slower +16.55 ms

##### With input 100 #####
Name                                ips        average  deviation         median         99th %
aggregate parallel iter          140.59        7.11 ms     ±3.14%        7.10 ms        7.77 ms
aggregate sequential iter         24.62       40.62 ms     ±0.34%       40.60 ms       41.16 ms

Comparison:
aggregate parallel iter          140.59
aggregate sequential iter         24.62 - 5.71x slower +33.51 ms

##### With input 150 #####
Name                                ips        average  deviation         median         99th %
aggregate parallel iter           88.74       11.27 ms     ±5.62%       11.46 ms       12.51 ms
aggregate sequential iter         16.39       61.00 ms     ±1.13%       60.87 ms       66.62 ms

Comparison:
aggregate parallel iter           88.74
aggregate sequential iter         16.39 - 5.41x slower +49.73 ms

##### With input 200 #####
Name                                ips        average  deviation         median         99th %
aggregate parallel iter           66.21       15.10 ms     ±2.54%       15.03 ms       16.55 ms
aggregate sequential iter         12.46       80.29 ms     ±0.59%       80.37 ms       81.81 ms

Comparison:
aggregate parallel iter           66.21
aggregate sequential iter         12.46 - 5.32x slower +65.18 ms

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.

1 participant