I translated a numerical loop from C to Julia expecting similar speed. It sums a function over a Vector{Float64} of 10 million samples, written as a script at top level with the data and a couple of parameters as ordinary variables. @time reports millions of allocations, which I did not expect from a loop that only adds numbers.
What are the usual reasons for this, and which tools show where the time and the allocations come from?




