Re: [go-nuts] Making sense of Go profiling output

2017-08-23 Thread Jakob Borg
On 23 Aug 2017, at 10:00, Deepak Jois wrote: > > I am profiling a Go program that calls into C using cgo, and then > tries to get a pointer to unsafe data. In the profiling, I see that > over 62% of the time is spent in a call which is of the form > > func getBytes(val *C.MDB_val) []byte { >

[go-nuts] Making sense of Go profiling output

2017-08-23 Thread Deepak Jois
I am profiling a Go program that calls into C using cgo, and then tries to get a pointer to unsafe data. In the profiling, I see that over 62% of the time is spent in a call which is of the form func getBytes(val *C.MDB_val) []byte { return (*[valMaxSize]byte)(unsafe.Pointer(val.mv_data))[:va