| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 6186b3e commit f318a85
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,6 +5,12 @@ const bench = common.createBenchmark(main, { | |||
| 5 | 5 | bytes: [0, 8, 128, 32 * 1024], | |
| 6 | 6 | partial: ['true', 'false'], | |
| 7 | 7 | n: [6e6] | |
| 8 | + }, { | ||
| 9 | + combinationFilter: (p) => { | ||
| 10 | + return (p.partial === 'false' && p.bytes === 0) || | ||
| 11 | + (p.partial !== 'false' && p.bytes !== 0); | ||
| 12 | + }, | ||
| 13 | + test: { partial: 'false', bytes: 0 }, | ||
| 8 | 14 | }); | |
| 9 | 15 | ||
| 10 | 16 | function main({ n, bytes, partial }) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,9 +19,14 @@ const searchStrings = [ | |||
| 19 | 19 | ||
| 20 | 20 | const bench = common.createBenchmark(main, { | |
| 21 | 21 | search: searchStrings, | |
| 22 | - encoding: ['utf8', 'ucs2'], | ||
| 22 | + encoding: ['undefined', 'utf8', 'ucs2'], | ||
| 23 | 23 | type: ['buffer', 'string'], | |
| 24 | 24 | n: [5e4] | |
| 25 | + }, { | ||
| 26 | + combinationFilter: (p) => { | ||
| 27 | + return (p.type === 'buffer' && p.encoding === 'undefined') || | ||
| 28 | + (p.type !== 'buffer' && p.encoding !== 'undefined'); | ||
| 29 | + }, | ||
| 25 | 30 | }); | |
| 26 | 31 | ||
| 27 | 32 | function main({ n, search, encoding, type }) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,10 +3,15 @@ | |||
| 3 | 3 | const common = require('../common.js'); | |
| 4 | 4 | ||
| 5 | 5 | const bench = common.createBenchmark(main, { | |
| 6 | - encoding: ['utf8', 'ascii', 'latin1', 'hex', 'UCS-2'], | ||
| 6 | + encoding: ['', 'utf8', 'ascii', 'latin1', 'hex', 'UCS-2'], | ||
| 7 | 7 | args: [0, 1, 3], | |
| 8 | 8 | len: [1, 64, 1024], | |
| 9 | 9 | n: [1e6] | |
| 10 | + }, { | ||
| 11 | + combinationFilter: (p) => { | ||
| 12 | + return (p.args === 0 && p.encoding === '') || | ||
| 13 | + (p.args !== 0 && p.encoding !== ''); | ||
| 14 | + }, | ||
| 10 | 15 | }); | |
| 11 | 16 | ||
| 12 | 17 | function main({ encoding, args, len, n }) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments