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

Precompute twiddle factors #145

Closed
wants to merge 3 commits into from
Closed

Precompute twiddle factors #145

wants to merge 3 commits into from

Conversation

gabrielbosio
Copy link
Contributor

@gabrielbosio gabrielbosio commented Jul 4, 2023

Resolves #107.
This PR adds twiddle factors precomputation. The twiddle factors affected are the ones that form a vector of length domain_size.
It also fixes linter issues related with the usage of the updated Lambdaworks crates.
It improves the performance of the prover by 4% for fibo 10 and 3% for fibo 100 and regresses the performance of the verifier by 2% for fibo 10 and 3% for fibo 100.

@gabrielbosio gabrielbosio reopened this Jul 4, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jul 4, 2023

Codecov Report

Merging #145 (73f7046) into main (4e4f72e) will increase coverage by 0.00%.
The diff coverage is 99.58%.

@@           Coverage Diff           @@
##             main     #145   +/-   ##
=======================================
  Coverage   97.38%   97.39%           
=======================================
  Files          40       40           
  Lines        6930     6978   +48     
=======================================
+ Hits         6749     6796   +47     
- Misses        181      182    +1     
Impacted Files Coverage Δ
src/cairo/decode/instruction_flags.rs 97.15% <ø> (ø)
src/starks/prover.rs 99.72% <98.00%> (-0.13%) ⬇️
src/cairo/air.rs 99.88% <100.00%> (-0.01%) ⬇️
src/cairo/execution_trace.rs 99.73% <100.00%> (-0.01%) ⬇️
src/starks/constraints/boundary.rs 92.70% <100.00%> (ø)
src/starks/constraints/evaluator.rs 100.00% <100.00%> (ø)
src/starks/domain.rs 100.00% <100.00%> (ø)
src/starks/example/dummy_air.rs 100.00% <100.00%> (ø)
src/starks/example/fibonacci_2_columns.rs 100.00% <100.00%> (ø)
src/starks/example/fibonacci_rap.rs 100.00% <100.00%> (ø)
... and 2 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@gabrielbosio gabrielbosio marked this pull request as ready for review July 4, 2023 18:57
@MauroToscano MauroToscano self-requested a review July 4, 2023 19:18
@MauroToscano
Copy link
Collaborator

I'm not sure this is a worth tradeoff

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.

perf: avoid recalculating twiddle factors
3 participants