Optimizations

Building arrays via `arr[i] = x` is ~45% faster than `arr.push(x)`. See http://jsperf.com/sylvesterloops/2
Store references to mOrV.elements.
Inline loops instead of call out to map, which calls to forEach.
(Specifically, I optimized for FF and chrome, and the gain in FF doesn't outweigh the loss in chrome.)