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

patch circom_runtime to fix semaphore performance in same way that we fixed zk-eddsa-ticket-pcd #1797

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

ichub
Copy link
Contributor

@ichub ichub commented Jun 18, 2024

Copy link
Collaborator

@rrrliu rrrliu left a comment

Choose a reason for hiding this comment

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

tested and works, one nit mostly out of curiosity and paranoia

options = options || {};

- let memorySize = 32767;
+ let memorySize = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

how sure are we that 0 works and it just dynamically allocates correctly + efficiently?

testing seems to work but do you know if the underlying library actually makes the memory grow dynamically

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If it doesn't work we can always revert. I am planning on doing more research on this in order to be able to confidently submit a PR to the actual repo. IMO based on the testing I've done this is pretty safe.

@ichub ichub added this pull request to the merge queue Jun 19, 2024
Merged via the queue into main with commit 9904591 Jun 19, 2024
1 check passed
@artwyman
Copy link
Member

Wow, patch-package is magical. Thanks @robknight for sharing the technique.

This was the kind of thing I was hoping for when I brought up the idea of monkeypatching for this issue (in real-world conversation not GitHub), drawing on my Python experience. This seems a sound approach for doing the same thing at build time, which is more reliable.

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

Successfully merging this pull request may close these issues.

4 participants