I'm new to go, and have being looking at escape analysis by benchmarking
some code that I created.
What I see is the escape analysis shows that certain variables escape to
the heap.
parameter path leaks to {heap} with derefs=2
But the result of the benchmark test shows 0 allocations.
1000000000 0.00429 ns/op 0 B/op 0 allocs/op
Does the 0 allocs/op mean that the compiler optimised the code and the
parameter path did not leak to the heap? Also, since there are 0
allocs/ops does this mean I don't need to be concerned about leaking to the
heap?
Allocation recording is turned on in the test
Thanks
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/20bd20e1-c16c-441d-81b0-d182aa6268e1o%40googlegroups.com.