4 ms·
That might be an improvement, but you probably wouldn't want to use Array.map, which generally has pretty terrible performance. See http://jsperf.com/map-vs-nat
by mistercow 14y ago
That might be an improvement, but you probably wouldn't want to use Array.map, which generally has pretty terrible performance. See http://jsperf.com/map-vs-native-for-loop/5 http://jsperf.com/map-vs-native-for-loop/5
- rb12345 14y agoYes; the only reason for using Array.map() here is conciseness and similarity to the original code.