Improve perf of max and min common case with arrays.

This commit is contained in:
jdalton
2015-06-17 22:35:53 -07:00
parent e95ae66af0
commit 56cd679bcd

View File

@@ -3316,7 +3316,7 @@
}
iteratee = getCallback(iteratee, thisArg, 3);
if (iteratee.length == 1) {
collection = toIterable(collection);
collection = isArray(collection) ? collection : toIterable(collection);
var result = arrayExtremum(collection, iteratee, comparator, exValue);
if (!(collection.length && result === exValue)) {
return result;