GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Revert "benchmark: remove special test entries" · GLStephen/node@7cfbc9f

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • benchmark
    • assert
      • deepequal-buffer.js
      • deepequal-map.js
      • deepequal-object.js
      • deepequal-prims-and-objs-big-array-set.js
      • deepequal-prims-and-objs-big-loop.js
      • deepequal-set.js
      • deepequal-typedarrays.js
      • throws.js
    • buffers
      • buffer-bytelength.js
      • buffer-creation.js
      • buffer-fill.js
      • buffer-iterate.js
      • buffer-read-float.js
      • buffer-read-with-byteLength.js
      • buffer-read.js
      • buffer-swap.js
      • buffer-write.js
      • dataview-set.js
    • crypto
      • aes-gcm-throughput.js
      • cipher-stream.js
    • es
      • defaultparams-bench.js
      • destructuring-bench.js
      • destructuring-object-bench.js
      • foreach-bench.js
      • map-bench.js
      • restparams-bench.js
      • spread-assign.js
      • spread-bench.js
      • string-concatenations.js
      • string-repeat.js
    • misc
      • arguments.js
      • getstringwidth.js
      • object-property-bench.js
      • punycode.js
      • trace.js
      • util-extend-vs-object-assign.js
    • url
      • url-format.js
      • url-parse.js
    • util
      • format.js
      • inspect-array.js
      • type-check.js

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎benchmark/assert/deepequal-buffer.js‎

Copy file name to clipboardExpand all lines: benchmark/assert/deepequal-buffer.js
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ const bench = common.createBenchmark(main, {
66
n: [2e4],
77
len: [1e2, 1e3],
88
strict: [0, 1],
9-
method: ['deepEqual', 'notDeepEqual'],
9+
method: [ 'deepEqual', 'notDeepEqual' ],
1010
});
1111

1212
function main({ len, n, method, strict }) {
13+
if (!method)
14+
method = 'deepEqual';
1315
const data = Buffer.allocUnsafe(len + 1);
1416
const actual = Buffer.alloc(len);
1517
const expected = Buffer.alloc(len);
Collapse file

‎benchmark/assert/deepequal-map.js‎

Copy file name to clipboardExpand all lines: benchmark/assert/deepequal-map.js
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ function main({ n, len, method, strict }) {
3434
const array = Array(len).fill(1);
3535

3636
switch (method) {
37+
case '':
38+
// Empty string falls through to next line as default, mostly for tests.
3739
case 'deepEqual_primitiveOnly': {
3840
const values = array.map((_, i) => [`str_${i}`, 123]);
3941
benchmark(strict ? deepStrictEqual : deepEqual, n, values);
Collapse file

‎benchmark/assert/deepequal-object.js‎

Copy file name to clipboardExpand all lines: benchmark/assert/deepequal-object.js
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const bench = common.createBenchmark(main, {
77
n: [5e3],
88
size: [1e2, 1e3, 5e4],
99
strict: [0, 1],
10-
method: ['deepEqual', 'notDeepEqual'],
10+
method: [ 'deepEqual', 'notDeepEqual' ],
1111
});
1212

1313
function createObj(source, add = '') {
@@ -27,6 +27,9 @@ function main({ size, n, method, strict }) {
2727
// TODO: Fix this "hack". `n` should not be manipulated.
2828
n = Math.min(Math.ceil(n / size), 20);
2929

30+
if (!method)
31+
method = 'deepEqual';
32+
3033
const source = Array.apply(null, Array(size));
3134
const actual = createObj(source);
3235
const expected = createObj(source);
Collapse file

‎benchmark/assert/deepequal-prims-and-objs-big-array-set.js‎

Copy file name to clipboardExpand all lines: benchmark/assert/deepequal-prims-and-objs-big-array-set.js
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ function main({ n, len, primitive, method, strict }) {
5252
const expectedWrongSet = new Set(expectedWrong);
5353

5454
switch (method) {
55+
// Empty string falls through to next line as default, mostly for tests.
56+
case '':
5557
case 'deepEqual_Array':
5658
run(strict ? deepStrictEqual : deepEqual, n, actual, expected);
5759
break;
Collapse file

‎benchmark/assert/deepequal-prims-and-objs-big-loop.js‎

Copy file name to clipboardExpand all lines: benchmark/assert/deepequal-prims-and-objs-big-loop.js
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ const bench = common.createBenchmark(main, {
1313
primitive: Object.keys(primValues),
1414
n: [2e4],
1515
strict: [0, 1],
16-
method: ['deepEqual', 'notDeepEqual'],
16+
method: [ 'deepEqual', 'notDeepEqual' ],
1717
});
1818

1919
function main({ n, primitive, method, strict }) {
20+
if (!method)
21+
method = 'deepEqual';
2022
const prim = primValues[primitive];
2123
const actual = prim;
2224
const expected = prim;
Collapse file

‎benchmark/assert/deepequal-set.js‎

Copy file name to clipboardExpand all lines: benchmark/assert/deepequal-set.js
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ function main({ n, len, method, strict }) {
3434
const array = Array(len).fill(1);
3535

3636
switch (method) {
37+
case '':
38+
// Empty string falls through to next line as default, mostly for tests.
3739
case 'deepEqual_primitiveOnly': {
3840
const values = array.map((_, i) => `str_${i}`);
3941
benchmark(strict ? deepStrictEqual : deepEqual, n, values);
Collapse file

‎benchmark/assert/deepequal-typedarrays.js‎

Copy file name to clipboardExpand all lines: benchmark/assert/deepequal-typedarrays.js
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ const bench = common.createBenchmark(main, {
2020
});
2121

2222
function main({ type, n, len, method, strict }) {
23+
if (!method)
24+
method = 'deepEqual';
2325
const clazz = global[type];
2426
const actual = new clazz(len);
2527
const expected = new clazz(len);
Collapse file

‎benchmark/assert/throws.js‎

Copy file name to clipboardExpand all lines: benchmark/assert/throws.js
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ function main({ n, method }) {
1515
const message = 'failure';
1616

1717
switch (method) {
18+
case '':
19+
// Empty string falls through to next line as default, mostly for tests.
1820
case 'doesNotThrow':
1921
bench.start();
2022
for (let i = 0; i < n; ++i) {
Collapse file

‎benchmark/buffers/buffer-bytelength.js‎

Copy file name to clipboardExpand all lines: benchmark/buffers/buffer-bytelength.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ const chars = [
1717

1818
function main({ n, len, encoding }) {
1919
let strings = [];
20-
let results = [len * 16];
20+
let results = [ len * 16 ];
2121
if (encoding === 'buffer') {
22-
strings = [Buffer.alloc(len * 16, 'a')];
22+
strings = [ Buffer.alloc(len * 16, 'a') ];
2323
} else {
2424
for (const string of chars) {
2525
// Strings must be built differently, depending on encoding
Collapse file

‎benchmark/buffers/buffer-creation.js‎

Copy file name to clipboardExpand all lines: benchmark/buffers/buffer-creation.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const bench = common.createBenchmark(main, {
1616
function main({ len, n, type }) {
1717
let fn, i;
1818
switch (type) {
19+
case '':
1920
case 'fast-alloc':
2021
fn = Buffer.alloc;
2122
break;

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.