-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
testing: performance regression in TB.Helper in Go 1.12 relative to Go 1.11 #32093
Comments
|
It's another ~10% slower at tip :( I found a simple fix though that actually makes it a bit faster than 1.11. I'll mail it out. |
Change https://golang.org/cl/177858 mentions this issue: |
@g7r is the problem for you specifically with testing.TB.Helper, or was that just the way you chose to demonstrate the regression? (@randall77's fix in CL 177858 is specifically for Helper.) |
@cespare yes, mine problem is specifically with |
@g7r thanks -- I went ahead and retitled the issue accordingly. I do wonder whether the underlying regression in runtime.Callers/CallersFrames will show up in other contexts. |
There is more we could do here, but it's getting late for big things for 1.13. |
Change https://golang.org/cl/178077 mentions this issue: |
That way we will never have to look up the file/line for the frame that's next to be returned when the user stops calling Next. For the benchmark from #32093: name old time/op new time/op delta Helper-4 948ns ± 1% 836ns ± 3% -11.89% (p=0.000 n=9+9) (#32093 was fixed with a more specific, and better, fix, but this fix is much more general.) Change-Id: I89e796f80c9706706d8d8b30eb14be3a8a442846 Reviewed-on: https://go-review.googlesource.com/c/go/+/178077 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
What version of Go are you using (
go version
)?and
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Here's the benchmark: https://play.golang.org/p/4PufWKn1Epv
benchstat
output:What did you expect to see?
No performance regression.
What did you see instead?
Go 1.12.5 is 20% slower than Go 1.11.10.
The text was updated successfully, but these errors were encountered: