-
Notifications
You must be signed in to change notification settings - Fork 17.5k
-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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
cmd/gc, time: make Format 5x faster #3679
Labels
Comments
Is Luuk's work in http://golang.org/cl/5966075/ of use here ? |
changeset: 13401:bff65816ad27 user: Russ Cox <rsc@golang.org> date: Sun Jun 03 11:08:17 2012 -0400 files: src/pkg/time/format.go src/pkg/time/time.go src/pkg/time/time_test.go src/pkg/time/zoneinfo.go description: time: make Format 2.7x faster benchmark old ns/op new ns/op delta BenchmarkFormat 2495 937 -62.44% BenchmarkFormatNow 2308 889 -61.48% Update issue #3679. R=r CC=golang-dev http://golang.org/cl/6278047 |
That's too bad. Mainly it was making string manipulation a bit faster. Removing LEAQs will help. So does special casing x = append(x, "123"...) as x = append(x, '1', '2', '3') for short strings and also copy(x, "123"). In general I was just unhappy with the performance of string manipulations. |
Profiling some of the benchmarks from http://www.techempower.com/benchmarks/ recently, I found we were spending about as much time formatting the optional HTTP "Date" response header as we were serializing JSON. (at least after https://golang.org/cl/9129044/) Labels changed: added performance. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: