mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Optimize _.union.
Former-commit-id: 0cba8cac81a621b1fdbe8868ab406a30eb1d743f
This commit is contained in:
36
perf/perf.js
36
perf/perf.js
@@ -1631,6 +1631,42 @@
|
||||
)
|
||||
);
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.union` iterating an array of 50 elements')
|
||||
.add(buildName, {
|
||||
'fn': 'lodash.union(twentyFiveValues, twentyFiveValues2);',
|
||||
'teardown': 'function multiArrays(){}'
|
||||
})
|
||||
.add(otherName, {
|
||||
'fn': '_.union(twentyFiveValues, twentyFiveValues2);',
|
||||
'teardown': 'function multiArrays(){}'
|
||||
})
|
||||
);
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.union` iterating an array of 75 elements')
|
||||
.add(buildName, {
|
||||
'fn': 'lodash.union(fiftyValues, twentyFiveValues2);',
|
||||
'teardown': 'function multiArrays(){}'
|
||||
})
|
||||
.add(otherName, {
|
||||
'fn': '_.union(fiftyValues, twentyFiveValues2);',
|
||||
'teardown': 'function multiArrays(){}'
|
||||
})
|
||||
);
|
||||
|
||||
suites.push(
|
||||
Benchmark.Suite('`_.union` iterating an array of 100 elements')
|
||||
.add(buildName, {
|
||||
'fn': 'lodash.union(seventyFiveValues, twentyFiveValues2);',
|
||||
'teardown': 'function multiArrays(){}'
|
||||
})
|
||||
.add(otherName, {
|
||||
'fn': '_.union(seventyFiveValues, twentyFiveValues2);',
|
||||
'teardown': 'function multiArrays(){}'
|
||||
})
|
||||
);
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
suites.push(
|
||||
|
||||
Reference in New Issue
Block a user