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

Use Once from std when available #352

Closed
Kixunil opened this issue Jan 4, 2022 · 3 comments
Closed

Use Once from std when available #352

Kixunil opened this issue Jan 4, 2022 · 3 comments

Comments

@Kixunil
Copy link
Collaborator

Kixunil commented Jan 4, 2022

The current code in secp256k1_context_preallocated_create uses hand-rolled busy loop even when Once is available potentially wasting CPU. Abstracting them away and conditionally using Once from std would avoid the waste.

@elichai
Copy link
Member

elichai commented Jan 4, 2022

I think this is only for the fuzzing configuration?

@Kixunil
Copy link
Collaborator Author

Kixunil commented Jan 4, 2022

Yeah, didn't notice, probably not worth the effort.

@Kixunil Kixunil closed this as completed Jan 4, 2022
@TheBlueMatt
Copy link
Member

Right, the point of the hand-rolled code there is precisely to avoid relying on std/thread sleeping in fuzzing. Honestly I forget what the configuration I was trying to match was when I wrote it, proabbly driller or similar.

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

3 participants