Optimize _.uniq and others in Firefox.

This commit is contained in:
jdalton
2015-02-21 01:13:34 -08:00
parent a910884e7d
commit 861aaf06c6

View File

@@ -1963,7 +1963,7 @@
var index = -1,
indexOf = getIndexOf(),
isCommon = indexOf == baseIndexOf,
cache = isCommon && values.length >= 200 && createCache(values),
cache = (isCommon && values.length >= 200) ? createCache(values) : null,
valuesLength = values.length;
if (cache) {
@@ -2783,7 +2783,7 @@
length = array.length,
isCommon = indexOf == baseIndexOf,
isLarge = isCommon && length >= 200,
seen = isLarge && createCache(),
seen = isLarge ? createCache() : null,
result = [];
if (seen) {
@@ -4772,7 +4772,7 @@
var value = arguments[argsIndex];
if (isArray(value) || isArguments(value)) {
args.push(value);
caches.push(isCommon && value.length >= 120 && createCache(argsIndex && value));
caches.push((isCommon && value.length >= 120) ? createCache(argsIndex && value) : null);
}
}
argsLength = args.length;