Use array operations in julia for order of maginitude speed up