A comparison of different approaches to operating on an array