Skip to content

Added worker version for Go #46

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

Merged
merged 3 commits into from
Sep 5, 2018
Merged

Added worker version for Go #46

merged 3 commits into from
Sep 5, 2018

Conversation

euantorano
Copy link
Contributor

@euantorano euantorano commented Sep 2, 2018

This adds a slightly modified version of the Go program for episode 9 which uses a worker pool and only creates as many goroutines as there are logical threads on the system.

The Rust version seems to act similarly - Rayon will only start one thread per CPU for the par_iter() as far as I understand it.

I haven't done any benchmarking to compare times between this and the fixed.go version, but thought it might be nice to see another approach to the problem, similar to #45.

Signed-off-by: Euan Torano <euantorano@gmail.com>
@mre
Copy link
Member

mre commented Sep 3, 2018

Uuuh, that's cleaner. Thanks for the PR. 👍
Could you also add your improvement to the errata section similar to this one?
Note to self: I should probably rename this section to "Improvements and errata".

@euantorano
Copy link
Contributor Author

Sure, I can do that tomorrow night 😄

@mre
Copy link
Member

mre commented Sep 5, 2018

Ping. 😉

@euantorano
Copy link
Contributor Author

Errata added @mre - sorry for the delay 😄

@mre mre merged commit 6ef0852 into hello-rust:master Sep 5, 2018
@mre
Copy link
Member

mre commented Sep 5, 2018

Great! Thanks for your contribution @euantorano. 🎉

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.

2 participants