Use typed array to boost performance by 50%