vec optimization