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
proposal: standard library optimizations #39314
Comments
Even while this is closed. A suggestion. Please use https://pkg.go.dev/golang.org/x/perf/cmd/benchstat?tab=doc and run multiple rounds (10 or 20) on a quiet machine to get output that looks like:
Its easier to judge the relative and consistency of the speedup that way. |
@martisch so you don't want these types of contributions? old.txt new.txt |
Contributions that improve the speed of the standard library are welcome. There really isn't a need for a meta-issue like this, so it doesn't need to be open. Go ahead and submit specific optimization CLs when you have them. The contribution guide explains how to do it, if you haven't seen that already. The optimization you propose for |
@randall77 go/src/strconv/atof.go:17 func equalIgnoreCase(s1, s2 string) bool |
That no longer exists in the stdlib at tip. As of https://go-review.googlesource.com/c/go/+/230737 , I think. |
Thats neither what I wrote nor my intention. I had assumed since you earlier closed the issue that this should have been stayed close as it was reopened without comment. For discussions and questions about contributions its better to use https://groups.google.com/g/golang-dev. Generally feel free to send performance improving CLs that show concretely where and how the code will be changed and the benchmark data. No need to make it a proposal which is a more involved process of e.g. proposing a public API change for go. https://github.com/golang/proposal#readme |
I am going around the standard library and trying to find things to improve.
I don't know if this is a priority now but as you know people like to work on things they are interested in.
If you think changes like this will have a chance to get merged, i will gladly continue with this issue.
Example:
from:
To:
These benchmarks are on random data.
BenchmarkEqualIgnoreCase-8 12356467 93.7 ns/op
BenchmarkEqualIgnoreCase1-8 11593638 99.6 ns/op
BenchmarkEqualIgnoreCaseOld-8 5494894 216 ns/op
BenchmarkEqualIgnoreCaseOld1-8 5293328 222 ns/op
The text was updated successfully, but these errors were encountered: