From 54d22a23b5fe23cf253a72493c74a0dba4122484 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 17 Aug 2014 14:12:13 -0700 Subject: [PATCH] Avoid metadata cache for perf tests of slow paths of `_.bind` and `_.partial`. --- perf/perf.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/perf/perf.js b/perf/perf.js index 6248b71a6..f00aad74b 100644 --- a/perf/perf.js +++ b/perf/perf.js @@ -586,11 +586,11 @@ suites.push( Benchmark.Suite('`_.bind` (slow path)') .add(buildName, { - 'fn': 'lodash.bind(func, { "name": "fred" })', + 'fn': 'lodash.bind(function() { return this.name; }, { "name": "fred" })', 'teardown': 'function bind(){}' }) .add(otherName, { - 'fn': '_.bind(func, { "name": "fred" })', + 'fn': '_.bind(function() { return this.name; }, { "name": "fred" })', 'teardown': 'function bind(){}' }) ); @@ -1533,11 +1533,11 @@ suites.push( Benchmark.Suite('`_.partial` (slow path)') .add(buildName, { - 'fn': 'lodash.partial(func, "hi")', + 'fn': 'lodash.partial(function(greeting) { return greeting + " " + this.name; }, "hi")', 'teardown': 'function partial(){}' }) .add(otherName, { - 'fn': '_.partial(func, "hi")', + 'fn': '_.partial(function(greeting) { return greeting + " " + this.name; }, "hi")', 'teardown': 'function partial(){}' }) );