-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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/compile: unclear escape analysis #36504
Comments
I patched in that CL and its parent and ran the package benchmarks. I see zero allocs, across the board, with Go 1.12 (old escape analysis) and with tip. How did you get those profiling numbers? |
(Incidentally, inlining should be completely independent of escape analysis.) |
Ah, sorry, I forgot to mention that this is the generic code which you can access on non-amd64 GOARCH or with the
I meant that inlining prevents the values that can stay on the caller stack from escaping to the heap. |
I just ran
Running with
Is it possible that you forgot the appengine tag when running the compiler with |
Yup. It was me being dumb and getting confused by the fact that the Sent https://golang.org/cl/215498 to replace it with |
Happy to be of help. :) |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yep.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I have a function that (also thanks to inlining) I'd expect not to allocate anything to the heap.
https://go.googlesource.com/crypto/+/c8d9389ed30fa12bbe2123256b81a26dd5cbe7b8/chacha20poly1305/chacha20poly1305_generic.go (from CL 206977)
What did you see instead?
-gcflags=-m
has nothing about neitherpolyKey
norp
.The text was updated successfully, but these errors were encountered: