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

time: optimise time.GoString #54436

Closed
amarjeetanandsingh opened this issue Aug 13, 2022 · 3 comments
Closed

time: optimise time.GoString #54436

amarjeetanandsingh opened this issue Aug 13, 2022 · 3 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. Performance
Milestone

Comments

@amarjeetanandsingh
Copy link
Contributor

amarjeetanandsingh commented Aug 13, 2022

Currently Time.GoString uses methods like Year(), Month(), Day() to generate the string. These methods call absDate() internally. We can improve the performance by avoiding multiple calls to absDate().

@gopherbot
Copy link

Change https://go.dev/cl/423634 mentions this issue: time: optimise GoString

@amarjeetanandsingh
Copy link
Contributor Author

cc @ianlancetaylor @dsnet

@joedian joedian added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Aug 15, 2022
@joedian joedian added this to the Go1.20 milestone Aug 15, 2022
@dmitshur dmitshur added Performance NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. labels Aug 17, 2022
@AAlvarez90
Copy link

@amarjeetanandsingh Thanks for your contribution and observations. Although this issue was addressed somewhere else, we appreciate the time you took to look into a potential improvement here. Well done, mate.

@golang golang locked and limited conversation to collaborators Sep 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. Performance
Projects
None yet
Development

No branches or pull requests

5 participants