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

Change xy_dot_step instructions for use in combination with recurse_or_return #302

Open
Sword-Smith opened this issue Jun 11, 2024 · 0 comments
Labels
⏩ speedup Makes stuff go faster.

Comments

@Sword-Smith
Copy link
Collaborator

Sword-Smith commented Jun 11, 2024

Currently the xy_dot_step instructions treat the top-two stack elements as pointers and the subsequent three stack elements as an XFieldElement. If instead these instructions had the XFieldElement on top of the stack, and the pointers below, the instructions could be used very efficiently in combination with recurse_or_return.

This change would save 3/26 instructions from the snippet for barycentric evaluation, and be roughly neutral in the two other places where these instructions are used.

These four instructions in the barycentric evaluation snippet could be reduced to one:

                xx_dot_step
                // _ *ptec *partial_terms[n] [acc'] *codeword[n'] *partial_terms[n']

                dup 0
                swap 6
                pop 1
                // _ *ptec *partial_terms[n'] [acc'] *codeword[n'] *partial_terms[n']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⏩ speedup Makes stuff go faster.
Projects
None yet
Development

No branches or pull requests

1 participant