Skip to content
This repository has been archived by the owner on Nov 5, 2018. It is now read-only.

Add simple benchmarks #32

Merged
1 commit merged into from Nov 22, 2017
Merged

Add simple benchmarks #32

1 commit merged into from Nov 22, 2017

Conversation

ghost
Copy link

@ghost ghost commented Nov 20, 2017

Here's an initial set of simple benchmarks.

Copy link
Contributor

@jeehoonkang jeehoonkang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

I just left a minor question, but I think even without answering it it's worth merging this PR.

fn single_flush(b: &mut Bencher) {
const THREADS: usize = 16;

let start = Barrier::new(THREADS + 1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if is it possible that the cost of Barrier dominates the latency of single_flush. Do you have an insight on the numbers?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just tried inserting sleeps after start.wait() so that barriers don't get touched during the benchmark. It didn't affect the results in any measurable way.

@ghost ghost merged commit 454b31e into crossbeam-rs:master Nov 22, 2017
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant