Skip to content

Conversation

@gbotrel
Copy link
Collaborator

@gbotrel gbotrel commented Aug 16, 2023

This PR removes precompute of CosetTableReversed and CosetTableInvReversed in fft.Domain.
In practice these can be accessed from CosetTable and CosetTableInv .

New version may result in slightly slower FFT on small domains.

However, for large domains (think large plonk circuit), precomputing these and storing them in RAM contribute to a high memory load, hence the PR.

Copy link
Collaborator

@yelhousni yelhousni left a comment

Choose a reason for hiding this comment

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

This makes sense for large zkEVM circuits indeed. What is the exact slowdown on small circuits, say a 2-chain Groth16 verifier?

@gbotrel
Copy link
Collaborator Author

gbotrel commented Aug 16, 2023

Benchmarked groth16_bls12377 , virtually no delta on the M1 👍

@gbotrel
Copy link
Collaborator Author

gbotrel commented Aug 16, 2023

1% slower for a larger circuit.

@gbotrel gbotrel merged commit 1473fcf into develop Aug 16, 2023
@yelhousni yelhousni deleted the perf/smallerdomain branch August 16, 2023 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dep: linea Issues affecting downstream Linea type: perf

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants