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

Add winapi srwlock to benchmarks #256

Merged
merged 1 commit into from Oct 27, 2020
Merged

Add winapi srwlock to benchmarks #256

merged 1 commit into from Oct 27, 2020

Conversation

nico-abram
Copy link
Contributor

Since I saw you had pthreads in the benchmarks I figured it would make sense to add windows slim rwlocks to it too

It seems std uses srwlocks internally, but it might still make sense to add this since

  1. std could change in the future
  2. It has a fallback for windows xp which looks like it would possibly have some runtime overhead (Even if perfectly predicted the branch could still degrade performance since it would take a spot in the branch predictor right?)
  3. I see you also have pthread implementations in the benchmarks despite std using pthreads internally

With regards to point (2), I see non trivial differences between srwlock and std in an uncontended case:
imagen

benchmark/Cargo.toml Outdated Show resolved Hide resolved
@nico-abram
Copy link
Contributor Author

nico-abram commented Oct 24, 2020

Force pushed trailing newline in Cargo.toml and missing type declaration in non windows because of the if cfg!

benchmark/src/mutex.rs Outdated Show resolved Hide resolved
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.

None yet

3 participants