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

fixed go.go to properly select over channels during the put operation in select_both #697

Merged
merged 2 commits into from
May 19, 2021

Conversation

AidanGoldfarb
Copy link
Contributor

Per the crossbeam benchmark configuration the select_both function is defined as:

select_both: T threads send N / T messages each by selecting over T channels. T other threads receive N / T messages each by selecting over the T channels.

Previously, the select_both function in go.go did not utilize the select statement while sending messages. Added the use of the select statement.

@taiki-e
Copy link
Member

taiki-e commented May 15, 2021

Thanks for the PR! I'm curious how this change will change the benchmark results.

@AidanGoldfarb
Copy link
Contributor Author

Thanks for the PR! I'm curious how this change will change the benchmark results.

Here are my teams benchmarking results. Note this was done in during a project involving implementing channels in the Flix programming language, so they additional test results are our additions.

results

All tests were done on a machine 'node2x18a' at the University of Rochester cluster

node2x18 has two Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz.
1 MiB of L1d and L1i caches. The system also has a 32 MiB L2 cache and 44 MiB L3 cache.

Copy link
Member

@taiki-e taiki-e left a comment

Choose a reason for hiding this comment

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

bors r+

bors bot added a commit that referenced this pull request May 19, 2021
697: fixed go.go to properly select over channels during the put operation in select_both r=taiki-e a=AidanGoldfarb

Per the [crossbeam benchmark configuration](https://github.com/crossbeam-rs/crossbeam/blob/master/crossbeam-channel/benchmarks/README.md) the `select_both` function is defined as: 

> select_both: T threads send N / T messages each by selecting over T channels. T other threads receive N / T messages each by selecting over the T channels.

Previously, the `select_both` function in [go.go](https://github.com/crossbeam-rs/crossbeam/blob/3e83987f258ab85a6573704ba538f2efdfe587c1/crossbeam-channel/benchmarks/go.go#L128) did not utilize the `select` statement while sending messages. Added the use of the select statement. 

Co-authored-by: Aidan <[email protected]>
@bors
Copy link
Contributor

bors bot commented May 19, 2021

Build failed:

@taiki-e
Copy link
Member

taiki-e commented May 19, 2021

bors retry

@bors
Copy link
Contributor

bors bot commented May 19, 2021

Build succeeded:

@bors bors bot merged commit 8de64d9 into crossbeam-rs:master May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants