vectorize & add benchmark