You are allocating a copy of the slice in your loop here. Use @views to make this non-allocating.
Much better to use a 1d array of static arrays for this kind of thing. For example:
using StaticArrays
points = fill(@SVector[1.0, 1.0], 50000)
function indexing(points)
x = 0.0
for i = 1:length(points)
x += sum(points[i])
end
return x
end