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
Synchronization primitive improvements #3918
Conversation
Thanks for the PR. What kind of differences did you observe in the example code you were testing with this? |
@andrewrk These were only the results on my dev machine (ryzen 5 2600) so it may not be too representative. Am also yet to see the effects in actual software and plan to check out the zig-async-demo repo for more testing soon. for
for
|
In regards to the differences in zig-async-demo compiled with |
How much total time did the old structures take to complete? |
These test failures look legit |
@JesseRMeyer should note that the 200-500ms is the difference rather than the absolute time to complete; as that varies more based on machine + the amount of iterations specified in each run case |
Right. A ratio here would be a bit more meaningful. |
@JesseRMeyer ah you're right. Its around 0.9 - 1.2% slower under release-safe |
SpinLock
tryAcquire(): ?Held
(anddeinit()
for Mutex compatability)ResetEvent
Mutex
tryAcquire(): ?Held