I was having trouble finding performance characteristics for push!
and pushfirst!
on Vector{T}
so I wrote a quick test comparing the two and was surprised to find that they were the same speed - even when intermixed. I did my best to hunt around for the answer and got as far as this function in array.c until I decided I would give up and just ask.
When I allocate an empty array of size n, does it start adding to the middle instead of the front of the memory allocation? Doesn’t that have (admittedly small) performance implications for the usual case of just pushing things onto the end? Is there a way to change this behavior?