Skip to content

Commit

Permalink
Merge pull request #1899 from ljedrz/perf_poseidon_grain
Browse files Browse the repository at this point in the history
Speed up PoseidonGrainLFSR::new
  • Loading branch information
howardwu authored Aug 16, 2023
2 parents decbc5e + cda295b commit cc65e82
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions fields/src/traits/poseidon_grain_lfsr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,8 @@ impl PoseidonGrainLFSR {
}
}

#[allow(clippy::needless_range_loop)]
// b50, ..., b79 are set to 1
for i in 50..=79 {
state[i] = true;
}
state[50..=79].copy_from_slice(&[true; 30]);

// Initialize.
let mut res = Self { field_size_in_bits, state, head: 0 };
Expand Down

1 comment on commit cc65e82

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'snarkVM Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.50.

Benchmark suite Current: cc65e82 Previous: decbc5e Ratio
bls12_377: fq12_sub_assign 132 ns/iter (± 0) 80 ns/iter (± 0) 1.65

This comment was automatically generated by workflow using github-action-benchmark.

CC: @raychu86

Please sign in to comment.