Please sign in to comment.
Speed up array operations
Two tweaks to evalIndex: one is to simply speed up the common case of a 1-dimensional index and avoid the loop entirely. The other is to allocate an array of fixed size (3) to begin with so the compiler can do that first allocation on the heap. ArrayOperations-8 1.80µs ± 1% 1.13µs ± 1% -37.52% (p=0.008 n=5+5)
- Loading branch information...