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
doubt about goroutine with GOMAXPROCS limitation with benchmarking test #41905
Comments
Try changing your benchmarks to look like:
|
Thanks for the answer @AlexRouSg , so, I think that my doubt is related with the time that is executed the benchmarkers... For example, If I have 4 processors, I should run this much faster than with only one processor. Anyway, your suggestion left my test better, thank you very much |
Sorry forgot to add, run with e.g. I get
|
Thank you for the explanations. I realized that depending of the registers counter, create many goroutines is only more expensive for the server to execute. I think with that, I can continue with my studies. Again, thank you for your time to explain. it would take me a long time to get to know |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
I don't know.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I am trying to realize a benchmarking between the usage of GOROUTINE with One or Four processors, but my desired behavior is not being reproduced.
I ran this benchmarking.
What did you expect to see?
The result of
BenchmarkManyProcessors/Parallel-4
being faster than theBenchmarkOneProcessor/Parallel-4
.What did you see instead?
The result of BenchmarkOneProcessor is equal to the execution of many processors.
The text was updated successfully, but these errors were encountered: