microsoft / Spartan

Spartan: High-speed zkSNARKs without trusted setup
MIT License
689 stars 119 forks source link

Remove extremely minor duplication #63

Closed zk-Lee closed 1 year ago

zk-Lee commented 1 year ago

I noticed that the next_power_of_two call in the following code is redundant:

let N = (0..sparse_polys.len())
  .map(|i| sparse_polys[i].get_num_nz_entries())
  .max()
  .unwrap()
  .next_power_of_two();

Since next_power_of_two is already being called in the get_num_nz_entries method, it can be safely removed from this code without affecting performance. Therefore, I have made a pull request to remove this redundant call.

Thank you!