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

default number of threads should be number of physical cores, not logical #3

Open
grr opened this issue Nov 8, 2018 · 1 comment
Open

Comments

@grr
Copy link

grr commented Nov 8, 2018

the default number of threads should be set to the number of physical cores, not logical cores. If you have a 4 core machine with hyperthreads, the default number of threads is 8. This is actually a bit slower than if 4 threads were used, since each core is already fully utilized and the extra 4 threads incur extra context switching.

@cculianu
Copy link
Owner

cculianu commented Nov 9, 2018

Yeah you're right. I'll look at modifying this code. Not sure if go provides a platform-neutral mechanism to detect this but I'll lookk into it (it's been a while since I programmed in go).

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

No branches or pull requests

2 participants