Commit 86b3621
benchmark: rework assert benchmarks for correctness
This reworks most assert benchmarks to provide more reliable test
cases that also test more cases than before while keeping the
runtime low.
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>
PR-URL: #46593
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>1 parent c786ed3 commit 86b3621Copy full SHA for 86b3621
File tree
Expand file treeCollapse file tree
7 files changed
+123
-131
lines changedOpen diff view settings
Filter options
- benchmark/assert
Expand file treeCollapse file tree
7 files changed
+123
-131
lines changedOpen diff view settings
Collapse file
benchmark/assert/deepequal-buffer.js
Copy file name to clipboardExpand all lines: benchmark/assert/deepequal-buffer.js+31-11Lines changed: 31 additions & 11 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
6 | 6 | |
7 | 7 | |
8 | 8 | |
9 | | - |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
10 | 15 | |
11 | 16 | |
12 | | - |
13 | | - |
14 | | - |
15 | | - |
16 | | - |
17 | | - |
18 | | - |
19 | | - |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
20 | 35 | |
21 | 36 | |
22 | 37 | |
23 | 38 | |
| 39 | + |
24 | 40 | |
25 | | - |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
26 | 46 | |
27 | 47 | |
28 | 48 | |
29 | | - |
| 49 | + |
30 | 50 | |
31 | 51 | |
32 | 52 | |
Collapse file
benchmark/assert/deepequal-object.js
Copy file name to clipboardExpand all lines: benchmark/assert/deepequal-object.js+17-16Lines changed: 17 additions & 16 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
4 | 4 | |
5 | 5 | |
6 | 6 | |
7 | | - |
8 | | - |
9 | | - |
| 7 | + |
| 8 | + |
| 9 | + |
10 | 10 | |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
11 | 17 | |
12 | 18 | |
13 | | - |
14 | | - |
| 19 | + |
| 20 | + |
15 | 21 | |
16 | 22 | |
17 | 23 | |
| ||
24 | 30 | |
25 | 31 | |
26 | 32 | |
27 | | - |
28 | | - |
29 | | - |
30 | | - |
31 | | - |
32 | | - |
33 | | - |
34 | 33 | |
35 | 34 | |
36 | 35 | |
37 | 36 | |
38 | | - |
| 37 | + |
| 38 | + |
| 39 | + |
39 | 40 | |
40 | 41 | |
41 | | - |
42 | | - |
| 42 | + |
| 43 | + |
43 | 44 | |
44 | | - |
| 45 | + |
45 | 46 | |
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+51-9Lines changed: 51 additions & 9 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2 | 2 | |
3 | 3 | |
4 | 4 | |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
5 | 12 | |
6 | | - |
7 | | - |
8 | | - |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
9 | 29 | |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
10 | 50 | |
11 | 51 | |
12 | 52 | |
13 | 53 | |
14 | | - |
| 54 | + |
15 | 55 | |
16 | 56 | |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
17 | 61 | |
18 | 62 | |
19 | 63 | |
20 | 64 | |
21 | | - |
22 | | - |
23 | | - |
| 65 | + |
| 66 | + |
24 | 67 | |
25 | 68 | |
26 | 69 | |
27 | 70 | |
28 | 71 | |
29 | | - |
30 | 72 | |
31 | 73 | |
32 | 74 | |
33 | | - |
| 75 | + |
34 | 76 | |
35 | 77 | |
36 | 78 | |
Collapse file
…eepequal-prims-and-objs-big-array-set.js …assert/deepequal-simple-array-and-set.jsbenchmark/assert/deepequal-prims-and-objs-big-array-set.js renamed to benchmark/assert/deepequal-simple-array-and-set.js benchmark/assert/deepequal-prims-and-objs-big-array-set.js renamed to benchmark/assert/deepequal-simple-array-and-set.js
Copy file name to clipboardExpand all lines: benchmark/assert/deepequal-simple-array-and-set.js+14-28Lines changed: 14 additions & 28 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
4 | 4 | |
5 | 5 | |
6 | 6 | |
7 | | - |
8 | | - |
9 | | - |
10 | | - |
11 | | - |
12 | | - |
13 | | - |
14 | 7 | |
15 | | - |
16 | | - |
17 | | - |
18 | | - |
| 8 | + |
| 9 | + |
| 10 | + |
19 | 11 | |
20 | 12 | |
21 | 13 | |
| ||
32 | 24 | |
33 | 25 | |
34 | 26 | |
35 | | - |
36 | | - |
| 27 | + |
37 | 28 | |
38 | 29 | |
39 | | - |
40 | 30 | |
41 | | - |
42 | | - |
43 | | - |
44 | | - |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
45 | 37 | |
46 | | - |
47 | | - |
48 | | - |
49 | | - |
50 | | - |
51 | | - |
52 | | - |
53 | 38 | |
54 | 39 | |
55 | 40 | |
56 | 41 | |
57 | 42 | |
58 | 43 | |
59 | | - |
| 44 | + |
60 | 45 | |
61 | 46 | |
62 | | - |
| 47 | + |
| 48 | + |
63 | 49 | |
64 | 50 | |
65 | 51 | |
66 | | - |
| 52 | + |
67 | 53 | |
68 | 54 | |
69 | 55 | |
|
Collapse file
benchmark/assert/deepequal-typedarrays.js
Copy file name to clipboardExpand all lines: benchmark/assert/deepequal-typedarrays.js+10-8Lines changed: 10 additions & 8 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
7 | 7 | |
8 | 8 | |
9 | 9 | |
10 | | - |
11 | | - |
| 10 | + |
12 | 11 | |
13 | 12 | |
14 | 13 | |
| ||
23 | 22 | |
24 | 23 | |
25 | 24 | |
26 | | - |
27 | | - |
28 | | - |
29 | 25 | |
30 | 26 | |
31 | 27 | |
32 | 28 | |
33 | 29 | |
34 | | - |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
35 | 34 | |
36 | 35 | |
37 | 36 | |
38 | 37 | |
39 | | - |
40 | | - |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
41 | 43 | |
42 | 44 | |
43 | 45 | |
Collapse file
-17Lines changed: 0 additions & 17 deletions
This file was deleted.
Collapse file
-42Lines changed: 0 additions & 42 deletions
This file was deleted.
0 commit comments