O2 optimization with vectorize