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

Does not use all cores by default #8

Closed
reportingsjr opened this issue Sep 14, 2010 · 1 comment
Closed

Does not use all cores by default #8

reportingsjr opened this issue Sep 14, 2010 · 1 comment

Comments

@reportingsjr
Copy link
Contributor

Currently almost all new computers that come out have more than one core and many programs are not taking advantage of this. It would be really easy to add in support to just detect the number of cores a computer have and then set s->threads to that so people wouldn't have to deal with setting this by command line options. A lot of people who use this program may not know any better about this and thus not set the flag.

This line will give you the number of cores a computer has via boost::thread:
unsigned numCores = boost::thread::hardware_concurrency();

I think the old option should be kept, but to add this one a flag such as manualThreads or something would just need to be set true when a person uses the -m/--threads option.

@udoprog
Copy link
Owner

udoprog commented Sep 14, 2010

Fixed in 57aebb5
The default value for number of threads was changed from 1 to your recommendation.
Thanks!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants