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

Optimize update_acir #2474

Closed
Ethan-000 opened this issue Aug 29, 2023 · 5 comments · Fixed by #2476
Closed

Optimize update_acir #2474

Ethan-000 opened this issue Aug 29, 2023 · 5 comments · Fixed by #2476
Assignees
Labels
enhancement New feature or request

Comments

@Ethan-000
Copy link
Contributor

Problem

currently update_acir is taking a lot of times in some programs eg. eddsa and sha2_blocks execution

eddsa:

eddsa_flamegraph

sha2_blocks:

sha2_blocks_flamegraph

did some changes it seems these can be avoided

Happy Case

optimize this to

eddsa:

eddsa_no_update

sha2_blocks:

sha2_blocks_optimized_flamegraph

Alternatives Considered

No response

Additional Context

No response

Would you like to submit a PR for this Issue?

Maybe

Support Needs

No response

@Ethan-000
Copy link
Contributor Author

ping @kevaundray for visibility

@kevaundray
Copy link
Contributor

Nice! Can you explain the changes you made and quantify the difference in terms of percentage improvements?

@Ethan-000
Copy link
Contributor Author

Ethan-000 commented Aug 29, 2023

eddsa execution after optimization:

optimized

eddsa execution before optimization:

master

sha2block didn't change much based on criterion results it seems

after optmization

sha2blocksoptimized

before optimization

sha2blocksbeforeoptimized

@Ethan-000
Copy link
Contributor Author

Ethan-000 commented Aug 29, 2023

I think the way the code was written. the compiler was calling an internal method that allocates memory by collecting it into a vector, which can be avoided.

@kevaundray
Copy link
Contributor

eddsa execution after optimization:

optimized eddsa execution before optimization: master sha2block didn't change much based on criterion results it seems

after optmization

sha2blocksoptimized before optimization sha2blocksbeforeoptimized

Ah thanks for the numbers -- yeah this might become more pronounced the larger the program

@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants