fast vectorized computation