Improve performance of vector