mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-13 12:27:49 +00:00
Avoid metadata cache for perf tests of slow paths of _.bind and _.partial.
This commit is contained in:
@@ -586,11 +586,11 @@
|
|||||||
suites.push(
|
suites.push(
|
||||||
Benchmark.Suite('`_.bind` (slow path)')
|
Benchmark.Suite('`_.bind` (slow path)')
|
||||||
.add(buildName, {
|
.add(buildName, {
|
||||||
'fn': 'lodash.bind(func, { "name": "fred" })',
|
'fn': 'lodash.bind(function() { return this.name; }, { "name": "fred" })',
|
||||||
'teardown': 'function bind(){}'
|
'teardown': 'function bind(){}'
|
||||||
})
|
})
|
||||||
.add(otherName, {
|
.add(otherName, {
|
||||||
'fn': '_.bind(func, { "name": "fred" })',
|
'fn': '_.bind(function() { return this.name; }, { "name": "fred" })',
|
||||||
'teardown': 'function bind(){}'
|
'teardown': 'function bind(){}'
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
@@ -1533,11 +1533,11 @@
|
|||||||
suites.push(
|
suites.push(
|
||||||
Benchmark.Suite('`_.partial` (slow path)')
|
Benchmark.Suite('`_.partial` (slow path)')
|
||||||
.add(buildName, {
|
.add(buildName, {
|
||||||
'fn': 'lodash.partial(func, "hi")',
|
'fn': 'lodash.partial(function(greeting) { return greeting + " " + this.name; }, "hi")',
|
||||||
'teardown': 'function partial(){}'
|
'teardown': 'function partial(){}'
|
||||||
})
|
})
|
||||||
.add(otherName, {
|
.add(otherName, {
|
||||||
'fn': '_.partial(func, "hi")',
|
'fn': '_.partial(function(greeting) { return greeting + " " + this.name; }, "hi")',
|
||||||
'teardown': 'function partial(){}'
|
'teardown': 'function partial(){}'
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user