I told you the reason already. slice of struct is in the stack frame.
Am Freitag, 13. Oktober 2017 16:59:14 UTC+2 schrieb Gabriel Aszalos:
>
>
> For some reason, it seems that allocating a slice of slices takes up quite
> a bit of memory, while allocating the slice of structs takes up no memory?
Thanks Diego. I didn't know about the `--alloc_space` flag. Quite
insightful!!! For anyone else potentially interested in the results, here
they are:
Here are the results for the original FieldsFunc from the standard library:
>
>
> This is exactly what I was trying to figure out how I would be able to do,
> and more specifically, if there's an easy way to find out.
>
>
the pprof tool can read a memory or cpu profile created during your
benchmark, and then you can see details of your function, line by line, and
Superb! Thank you Ian. That is indeed insightful. In my case (as can be
seen in the commit message showing the benchstat output), allocations for
small ASCII test cases have a delta of +860%, which is 8 times more bytes
allocated. You've said:
> Then you have to figure out why they are
On Tue, Oct 10, 2017 at 12:50 AM, Gabriel Aszalos
wrote:
>
> I would love to find out the answer to this. Even if you don't know the
> answer but know how to investigate into it (using pprof or some tracing
> flags), I would also appreciate being guided in the right
I would love to find out the answer to this. Even if you don't know the
answer but know how to investigate into it (using pprof or some tracing
flags), I would also appreciate being guided in the right direction and I
would love to embark on the journey of finding out myself.
What I'm