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
Using atomics instead of mutexes could improve performance #120
Comments
Would love a PR ! Looks awesome |
hi @schollz, can i take up this ? |
@rustiever Sure |
Hey it looks like atomic package doesn't support atomic operation on float64, and are we trying to remove mutex completely? @schollz |
I think the goal of this PR is for optimization, so if mutex isn't optimal yes |
do you have any idea how to support atomic operations on |
Maybe its an old thread. But you can use it with |
I would recommend against this. It would make the code harder to understand, and I doubt the locking is actually a bottleneck. Sending out the rendered progress bar is probably the most expensive part, but a profile should tell you. |
Using atomics instead of mutexes can improve performance(just a small micro optimization). Also made a benchmark, so you can see the difference. I'd make a PR if interested @schollz
benchmark file:
benchmark result:
The text was updated successfully, but these errors were encountered: