We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Please answer these questions before submitting your issue. Thanks!
go version
go version go1.8.1 linux/amd64
The target source code version: e94b9d4
go env
$ go env GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/hnakamur/go" GORACE="" GOROOT="/usr/local/go" GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build252988026=/tmp/go-build -gno-record-gcc-switches" CXX="g++" CGO_ENABLED="1" PKG_CONFIG="pkg-config" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2"
This issue is not an error report. I optimized formatting time in log headers a little bit.
name old time/op new time/op delta Println-2 543ns ± 1% 474ns ± 0% -12.67% (p=0.000 n=8+9) PrintlnMicoroseconds-2 580ns ± 1% 511ns ± 0% -11.89% (p=0.000 n=10+10) name old alloc/op new alloc/op delta Println-2 21.0B ± 0% 21.0B ± 0% ~ (all equal) PrintlnMicoroseconds-2 21.0B ± 0% 21.0B ± 0% ~ (all equal) name old allocs/op new allocs/op delta Println-2 2.00 ± 0% 2.00 ± 0% ~ (all equal) PrintlnMicoroseconds-2 2.00 ± 0% 2.00 ± 0% ~ (all equal)
Could you take a look at the following two commits and tell me what do you think?
Before my optimization, I added BenchmarkPrintlnMicoroseconds to be used alongside with existing BenchmarkPrintln. https://github.com/hnakamur/go/commit/3442066c11696d05a1927d5467b4c1493cbd9ec7
BenchmarkPrintlnMicoroseconds
BenchmarkPrintln
Then I optimized itoa. Actually itoa remains the same for backward compatibility. I added itoaPad which avoids a buffer copy. https://github.com/hnakamur/go/commit/a95dd6dc3bcd6e4e5264f06859a7dc3b368545ef
itoa
itoaPad
The text was updated successfully, but these errors were encountered:
We can only accept code submitted via Gerrit which we have configured to require that you've submitted a CLA.
See https://golang.org/doc/contribute.html for how to send a change, including an optimization change.
Sorry, something went wrong.
CL https://golang.org/cl/42891 mentions this issue.
Thanks for your comment! I sent the change for review at https://go-review.googlesource.com/c/42891/
I'm closing this issue since now its' got 12% slower this this patch after rebase. https://go-review.googlesource.com/c/go/+/42891
No branches or pull requests
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?The target source code version: e94b9d4
What operating system and processor architecture are you using (
go env
)?What did you do?
This issue is not an error report.
I optimized formatting time in log headers a little bit.
Could you take a look at the following two commits and tell me what do you think?
Before my optimization, I added
BenchmarkPrintlnMicoroseconds
to be used alongside with existingBenchmarkPrintln
.https://github.com/hnakamur/go/commit/3442066c11696d05a1927d5467b4c1493cbd9ec7
Then I optimized
itoa
.Actually
itoa
remains the same for backward compatibility.I added
itoaPad
which avoids a buffer copy.https://github.com/hnakamur/go/commit/a95dd6dc3bcd6e4e5264f06859a7dc3b368545ef
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: