@time shows that my program is doing a lot of memory allocation, much of which I could probably avoid. For example
@time b2 = MyFirst.mysolve(f2, nhsub, nhsub.wtfast16yr) 1.998780 seconds (6.27 M allocations: 479.828 MiB, 2.69% gc time)
I’m trying to understand where it’s happening and how much of the time it’s taking. The gc time seems relatively small, but I assume memory allocation takes time too.
Profile.print() has a left-most column labelled Overhead. What is this supposed to represent? Memory allocation time? JIT time? sampler time?
https://docs.julialang.org/en/v1.5/manual/profile/ does not discuss the Overhead column, and the sample outputs there don’t even include it.
That same page does say
specific lines triggering allocation can often be inferred from profiling via the cost of garbage collection that these lines incur.
How exactly can one tell the cost of garbage collection? Is it the overhead field? Will it appear as an explicit call in the profile stack?
More substantively, I thought the places and time gc was triggered were somewhat random, and not necessarily the place the memory was allocated.
And, to repeat, what if I want to measure allocation directly? Do I need to go to the
--track-allocation option, which apparently requires a restart of Julia?
I’m using Julia 1.5.1 on MS Windows 10.