-
Notifications
You must be signed in to change notification settings - Fork 155
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
Replace orx-concurrent-vec
with append-only-vec
#555
Conversation
✅ Deploy Preview for salsa-rs canceled.
|
CodSpeed Performance ReportMerging #555 will improve performances by 12.16%Comparing Summary
Benchmarks breakdown
|
Seems like a winner! |
Thanks for fixing the version. I'll merge this tomorrow unless you wanted me to address something else. |
Okay I can't merge this while changes are requested. @nikomatsakis would you mind having another look. |
FWIW Of course, the upside is that array access is slightly cheaper (though looking closer this might not necessarily be the case because access always requires loading the contended length atomic) due to the extra ad-hoc synchronization, so if you expect writes to be relatively rare this may not be an issue.. but something to look out for. |
Thanks @ibraheemdev for the in-depth explanation. I do think the spin-lock is fine the way we use it (at least for ingredients) because all write paths go through a lock anyway. |
Interesting, a single-writer concurrent vector could be implemented more efficiently in general.. but probably not worth it for Salsa. |
An alternative to #554
append-only-vec
performs even better thanboxcar
and also helps to reduce the overall dependencies (and runs on 32bit!).