-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
runtime: huge performance drops in a timer application #35395
Comments
Your code has a busy wait in the If I change your loop to call And actually your comment "With function call, no need for runtime.Gosched()" is incorrect. The tip compiler is better about inlining, so there may not be any function calls there at all. I didn't check that, though. |
@ianlancetaylor Are you suggesting the performance drop caused by new changes to the inlining? Why the new async preemption didn't work out for the busy-wait? |
@changkun I think that is a possibility to consider. If I'm right, then the async preemption did kick in; that would be why the test passes at all. But I might also be wrong, and it might be something else, like the new timer code. In any case, I don't think there is any bug to fix here in the Go toolchain. We aren't going to make any promises about the performance of a busy wait loop. |
@ianlancetaylor Reasonable, then I am closing this due to nothing needs to be fixed. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, it is reproducible in the current master branch(6dc250f).
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
Performance improvements or fair performance changes.
What did you see instead?
The text was updated successfully, but these errors were encountered: