mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 17:47:49 +00:00
Replace cachedContains with createCache and further optimize linear array searches.
Former-commit-id: bfe905985c9125cbadfcf111ffd97b6f8ecdd58d
This commit is contained in:
52
perf/perf.js
52
perf/perf.js
@@ -775,6 +775,18 @@
|
||||
)
|
||||
);
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.difference` iterating 75 elements')
|
||||
.add(buildName, {
|
||||
'fn': 'lodash.difference(seventyFiveValues, seventyFiveValues2)',
|
||||
'teardown': 'function multiArrays(){}'
|
||||
})
|
||||
.add(otherName, {
|
||||
'fn': '_.difference(seventyFiveValues, seventyFiveValues2)',
|
||||
'teardown': 'function multiArrays(){}'
|
||||
})
|
||||
);
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.difference` iterating 200 elements')
|
||||
.add(buildName, {
|
||||
@@ -1076,6 +1088,18 @@
|
||||
)
|
||||
);
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.intersection` iterating 75 elements')
|
||||
.add(buildName, {
|
||||
'fn': 'lodash.intersection(seventyFiveValues, seventyFiveValues2)',
|
||||
'teardown': 'function multiArrays(){}'
|
||||
})
|
||||
.add(otherName, {
|
||||
'fn': '_.intersection(seventyFiveValues, seventyFiveValues2)',
|
||||
'teardown': 'function multiArrays(){}'
|
||||
})
|
||||
);
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.intersection` iterating 200 elements')
|
||||
.add(buildName, {
|
||||
@@ -1731,11 +1755,23 @@
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.union` iterating an array of 75 elements')
|
||||
.add(buildName, {
|
||||
'fn': 'lodash.union(fiftyValues, twentyFiveValues2)',
|
||||
'fn': 'lodash.union(twentyFiveValues, fiftyValues2)',
|
||||
'teardown': 'function multiArrays(){}'
|
||||
})
|
||||
.add(otherName, {
|
||||
'fn': '_.union(fiftyValues, twentyFiveValues2)',
|
||||
'fn': '_.union(twentyFiveValues, fiftyValues2)',
|
||||
'teardown': 'function multiArrays(){}'
|
||||
})
|
||||
);
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.union` iterating an array of 200 elements')
|
||||
.add(buildName, {
|
||||
'fn': 'lodash.union(oneHundredValues, oneHundredValues2)',
|
||||
'teardown': 'function multiArrays(){}'
|
||||
})
|
||||
.add(otherName, {
|
||||
'fn': '_.union(oneHundredValues, oneHundredValues2)',
|
||||
'teardown': 'function multiArrays(){}'
|
||||
})
|
||||
);
|
||||
@@ -1766,6 +1802,18 @@
|
||||
)
|
||||
);
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.uniq` iterating an array of 75 elements')
|
||||
.add(buildName, {
|
||||
'fn': 'lodash.uniq(twentyFiveValues.concat(fiftyValues2))',
|
||||
'teardown': 'function multiArrays(){}'
|
||||
})
|
||||
.add(otherName, {
|
||||
'fn': '_.uniq(twentyFiveValues.concat(fiftyValues2))',
|
||||
'teardown': 'function multiArrays(){}'
|
||||
})
|
||||
);
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.uniq` iterating an array of 200 elements')
|
||||
.add(buildName, {
|
||||
|
||||
Reference in New Issue
Block a user