-
Notifications
You must be signed in to change notification settings - Fork 18k
time.Now() slow on High Sierra #22601
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
Comments
Duplicate of #22037. This has been fixed on Go tip (will be 1.10), and was decided not to backport it to 1.9.2 because we didn't have any evidence that the loss of nanosecond precision was affecting real-world code. Nor we thought that the increase in execution time was going to impact real-world users. /cc @rsc |
@rasky, thanks. I'll close this. @donovanhide, we can reopen to discuss backport if you think it's a concern. |
@donovanhide it would be great if you could confirm that tip fixes for you, thanks |
Can confirm, with:
time.now() no longer shows up in pprof profiles at all on High Sierra. |
What version of Go are you using (
go version
)?go1.9.2 darwin/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?OS X 10.13 High Sierra
What did you do?
Call time.Now() frequently in latency sensitive code to measure time delay between receipt of network message and final processing of message.
What did you expect to see?
Similar pprof results on OS X and linux.
What did you see instead?
time.now() dominates in pprof profiles when run on OS X, but not on linux.
Seems like the fallback to the syscall happens. Not sure how to prevent this from occurring
The text was updated successfully, but these errors were encountered: