| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e4cc54a commit 7592cf4
5 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,8 +4,15 @@ const common = require('../common.js'); | |||
| 4 | 4 | const assert = require('assert'); | |
| 5 | 5 | ||
| 6 | 6 | const bench = common.createBenchmark(main, { | |
| 7 | - n: [25, 2e7], | ||
| 7 | + n: [2e7], | ||
| 8 | 8 | method: ['match', 'doesNotMatch'], | |
| 9 | + }, { | ||
| 10 | + combinationFilter(p) { | ||
| 11 | + // These benchmarks purposefully do not run by default. They do not provide | ||
| 12 | + // might insight, due to only being a small wrapper around a native regexp | ||
| 13 | + // call. | ||
| 14 | + return p.n === 1; | ||
| 15 | + }, | ||
| 9 | 16 | }); | |
| 10 | 17 | ||
| 11 | 18 | function main({ n, method }) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,8 +4,15 @@ const common = require('../common.js'); | |||
| 4 | 4 | const assert = require('assert'); | |
| 5 | 5 | ||
| 6 | 6 | const bench = common.createBenchmark(main, { | |
| 7 | - n: [25, 2e5], | ||
| 7 | + n: [2e5], | ||
| 8 | 8 | method: ['rejects', 'doesNotReject'], | |
| 9 | + }, { | ||
| 10 | + combinationFilter(p) { | ||
| 11 | + // These benchmarks purposefully do not run by default. They do not provide | ||
| 12 | + // much insight, due to only being a small wrapper around a native promise | ||
| 13 | + // with a few extra checks. | ||
| 14 | + return p.n === 1; | ||
| 15 | + }, | ||
| 9 | 16 | }); | |
| 10 | 17 | ||
| 11 | 18 | async function main({ n, method }) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,9 +4,15 @@ const common = require('../common.js'); | |||
| 4 | 4 | const assert = require('assert'); | |
| 5 | 5 | ||
| 6 | 6 | const bench = common.createBenchmark(main, { | |
| 7 | - n: [25, 2e5], | ||
| 7 | + n: [2e5], | ||
| 8 | 8 | type: ['string', 'object', 'number'], | |
| 9 | 9 | method: ['strictEqual', 'notStrictEqual'], | |
| 10 | + }, { | ||
| 11 | + combinationFilter(p) { | ||
| 12 | + // These benchmarks purposefully do not run by default. They do not provide | ||
| 13 | + // much insight, due to only being a small wrapper around `Object.is()`. | ||
| 14 | + return p.n === 1; | ||
| 15 | + }, | ||
| 10 | 16 | }); | |
| 11 | 17 | ||
| 12 | 18 | function main({ type, n, method }) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,8 +4,14 @@ const common = require('../common.js'); | |||
| 4 | 4 | const assert = require('assert'); | |
| 5 | 5 | ||
| 6 | 6 | const bench = common.createBenchmark(main, { | |
| 7 | - n: [25, 2e5], | ||
| 7 | + n: [2e5], | ||
| 8 | 8 | method: ['throws', 'doesNotThrow'], | |
| 9 | + }, { | ||
| 10 | + combinationFilter(p) { | ||
| 11 | + // These benchmarks purposefully do not run by default. They do not provide | ||
| 12 | + // much insight, due to only being a small wrapper around a try / catch. | ||
| 13 | + return p.n === 1; | ||
| 14 | + }, | ||
| 9 | 15 | }); | |
| 10 | 16 | ||
| 11 | 17 | function main({ n, method }) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments