In the second case, use append!(a, b) to modify a by concatenating b to it. That should be as fast as or faster than vcat.
push! and append! are designed to be “cheap” in the amortized sense: arrays typically have some extra capacity beyond their current length, which can be used to add more elements without extra memory allocation. If that extra capacity is not enough, Julia may try to see if there is unused memory right after the array, in which case it can extend the array without copying the existing data into other place, which, again, is cheaper than moving all data on each operation. That makes push! and append! complexity “amortized linear” in number of added elements.
vcat, on the other hand, is “pure” function, i.e. it does not modify the object passed to it but allocates a new array each time and copies the data. Hence, if you add elements by one via vcat, then the complexity is quadratic in number of added elements.