Commit db65594
benchmark: refactor buffer benchmarks
Currently the buffer benchmarks take significantly too long to
complete. This drastically reduces the overall runtime by removing
obsolete checked variations and reducing the iteration count.
It also improves the benchmarks by removing the deprecated
`new Buffer(size)` usage and some other small improvements.
PR-URL: #26418
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Peter Marshall <petermarshall@chromium.org>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>1 parent 337aef0 commit db65594Copy full SHA for db65594
File tree
Expand file treeCollapse file tree
23 files changed
+80
-105
lines changedOpen diff view settings
Filter options
- benchmark/buffers
Expand file treeCollapse file tree
23 files changed
+80
-105
lines changedOpen diff view settings
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 number | Diff line number | Diff line change |
|---|---|---|
| ||
3 | 3 | |
4 | 4 | |
5 | 5 | |
6 | | - |
7 | | - |
| 6 | + |
| 7 | + |
8 | 8 | |
9 | 9 | |
10 | 10 | |
|
Collapse file
benchmark/buffers/buffer-compare-instance-method.js
Copy file name to clipboardExpand all lines: benchmark/buffers/buffer-compare-instance-method.js+2-18Lines changed: 2 additions & 18 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2 | 2 | |
3 | 3 | |
4 | 4 | |
5 | | - |
6 | | - |
| 5 | + |
| 6 | + |
7 | 7 | |
8 | 8 | |
9 | 9 | |
| ||
16 | 16 | |
17 | 17 | |
18 | 18 | |
19 | | - |
20 | | - |
21 | | - |
22 | | - |
23 | | - |
24 | | - |
25 | | - |
26 | | - |
27 | | - |
28 | | - |
29 | | - |
30 | | - |
31 | | - |
32 | | - |
33 | | - |
34 | | - |
35 | 19 | |
36 | 20 | |
37 | 21 | |
|
Collapse file
benchmark/buffers/buffer-compare-offset.js
Copy file name to clipboardExpand all lines: benchmark/buffers/buffer-compare-offset.js+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
3 | 3 | |
4 | 4 | |
5 | 5 | |
6 | | - |
| 6 | + |
7 | 7 | |
8 | 8 | |
9 | 9 | |
|
Collapse file
benchmark/buffers/buffer-compare.js
Copy file name to clipboardExpand all lines: benchmark/buffers/buffer-compare.js+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
23 | 23 | |
24 | 24 | |
25 | 25 | |
26 | | - |
| 26 | + |
27 | 27 | |
28 | 28 | |
29 | 29 | |
|
Collapse file
benchmark/buffers/buffer-concat.js
Copy file name to clipboardExpand all lines: benchmark/buffers/buffer-concat.js+5-5Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2 | 2 | |
3 | 3 | |
4 | 4 | |
5 | | - |
| 5 | + |
6 | 6 | |
7 | 7 | |
8 | | - |
| 8 | + |
9 | 9 | |
10 | 10 | |
11 | 11 | |
12 | | - |
13 | | - |
| 12 | + |
| 13 | + |
14 | 14 | |
15 | 15 | |
16 | 16 | |
17 | 17 | |
18 | | - |
| 18 | + |
19 | 19 | |
20 | 20 | |
21 | 21 | |
|
Collapse file
benchmark/buffers/buffer-creation.js
Copy file name to clipboardExpand all lines: benchmark/buffers/buffer-creation.js+5-13Lines changed: 5 additions & 13 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | | - |
3 | 2 | |
4 | 3 | |
5 | 4 | |
| ||
9 | 8 | |
10 | 9 | |
11 | 10 | |
12 | | - |
13 | | - |
14 | | - |
15 | | - |
| 11 | + |
| 12 | + |
| 13 | + |
16 | 14 | |
17 | 15 | |
18 | 16 | |
| ||
24 | 22 | |
25 | 23 | |
26 | 24 | |
27 | | - |
| 25 | + |
28 | 26 | |
29 | 27 | |
30 | 28 | |
| ||
35 | 33 | |
36 | 34 | |
37 | 35 | |
38 | | - |
39 | | - |
40 | | - |
41 | | - |
42 | | - |
43 | | - |
44 | 36 | |
45 | 37 | |
46 | 38 | |
47 | 39 | |
48 | 40 | |
49 | | - |
| 41 | + |
50 | 42 | |
51 | 43 | |
52 | 44 | |
|
Collapse file
benchmark/buffers/buffer-fill.js
Copy file name to clipboardExpand all lines: benchmark/buffers/buffer-fill.js+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
14 | 14 | |
15 | 15 | |
16 | 16 | |
17 | | - |
| 17 | + |
18 | 18 | |
19 | 19 | |
20 | 20 | |
|
Collapse file
benchmark/buffers/buffer-from.js
Copy file name to clipboardExpand all lines: benchmark/buffers/buffer-from.js+13-12Lines changed: 13 additions & 12 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
8 | 8 | |
9 | 9 | |
10 | 10 | |
11 | | - |
12 | 11 | |
13 | 12 | |
14 | 13 | |
15 | 14 | |
16 | 15 | |
17 | | - |
18 | | - |
| 16 | + |
| 17 | + |
19 | 18 | |
20 | 19 | |
21 | 20 | |
| ||
26 | 25 | |
27 | 26 | |
28 | 27 | |
| 28 | + |
| 29 | + |
29 | 30 | |
30 | 31 | |
31 | 32 | |
32 | | - |
| 33 | + |
33 | 34 | |
34 | 35 | |
35 | 36 | |
36 | 37 | |
37 | 38 | |
38 | 39 | |
39 | | - |
| 40 | + |
40 | 41 | |
41 | 42 | |
42 | 43 | |
| ||
45 | 46 | |
46 | 47 | |
47 | 48 | |
48 | | - |
| 49 | + |
49 | 50 | |
50 | 51 | |
51 | 52 | |
52 | 53 | |
53 | 54 | |
54 | 55 | |
55 | | - |
| 56 | + |
56 | 57 | |
57 | 58 | |
58 | 59 | |
59 | 60 | |
60 | 61 | |
61 | 62 | |
62 | | - |
| 63 | + |
63 | 64 | |
64 | 65 | |
65 | 66 | |
66 | 67 | |
67 | 68 | |
68 | 69 | |
69 | | - |
| 70 | + |
70 | 71 | |
71 | 72 | |
72 | 73 | |
73 | 74 | |
74 | 75 | |
75 | 76 | |
76 | | - |
| 77 | + |
77 | 78 | |
78 | 79 | |
79 | 80 | |
80 | 81 | |
81 | 82 | |
82 | 83 | |
83 | | - |
| 84 | + |
84 | 85 | |
85 | 86 | |
86 | 87 | |
87 | 88 | |
88 | 89 | |
89 | 90 | |
90 | | - |
| 91 | + |
91 | 92 | |
92 | 93 | |
93 | 94 | |
|
Collapse file
benchmark/buffers/buffer-hex.js
Copy file name to clipboardExpand all lines: benchmark/buffers/buffer-hex.js+2-2Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
3 | 3 | |
4 | 4 | |
5 | 5 | |
6 | | - |
7 | | - |
| 6 | + |
| 7 | + |
8 | 8 | |
9 | 9 | |
10 | 10 | |
|
Collapse file
benchmark/buffers/buffer-indexof-number.js
Copy file name to clipboardExpand all lines: benchmark/buffers/buffer-indexof-number.js+4-2Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
5 | 5 | |
6 | 6 | |
7 | 7 | |
8 | | - |
| 8 | + |
9 | 9 | |
10 | 10 | |
11 | 11 | |
12 | 12 | |
13 | 13 | |
14 | 14 | |
15 | 15 | |
| 16 | + |
16 | 17 | |
17 | 18 | |
18 | | - |
| 19 | + |
19 | 20 | |
20 | 21 | |
| 22 | + |
21 | 23 | |
0 commit comments