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

Polynomial should not allocate #20

Open
huitseeker opened this issue Jun 5, 2024 · 0 comments
Open

Polynomial should not allocate #20

huitseeker opened this issue Jun 5, 2024 · 0 comments

Comments

@huitseeker
Copy link
Contributor

The Polynomial struct represents its coefficients as a Vec. Because these are also used by various Air::eval implementations, this means that vectors are being allocated at every row evaluation during proving.

Ideally, the coefficients should be stored in a fixed size array, though this would conflict with the arithmetic operations that cannot return a different type.

The arithmetic operations could be replaced with methods though so that they can return the right type (e.g. multiplication of two polynomial with degree N would return a polynomial of degree 2N)

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

No branches or pull requests

1 participant