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

Refactor Periodic columns handling in IR and codegen #43

Open
tohrnii opened this issue Oct 27, 2022 · 0 comments
Open

Refactor Periodic columns handling in IR and codegen #43

tohrnii opened this issue Oct 27, 2022 · 0 comments
Assignees

Comments

@tohrnii
Copy link
Contributor

tohrnii commented Oct 27, 2022

  1. Based on @bobbinth's comments on PR Add codegen for periodic columns #40 here, it might be better to change the periodic columns to Vec<Vec<Felt>> instead of Vec<Vec<u64>> at IR level as it might be helpful in the future when we may want to evaluate constraints at a random point..

  2. Also we could refactor the to_string() method for periodic columns proposed by @bobbinth here.

A thought for the future: instead of doing conversions from u64 to Felt here, we could do the following:

  1. Define static arrays for all periodic columns such that these arrays already contain Felt's.
  2. Inside get_periodic_column_values() convert these arrays to vectors (which should be just memory copy operations) and return.
    The performance benefit of the above is probably very minor - so, definitely not a high priority item.
@tohrnii tohrnii changed the title Change periodic columns type to Vec<Vec<Felt>> at IR level Refactor Periodic columns handling in IR and codegen Oct 27, 2022
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

2 participants