Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assert: refactor to avoid unsafe array iteration #37344

Merged
merged 1 commit into from
Feb 22, 2021

Conversation

aduh95
Copy link
Contributor

@aduh95 aduh95 commented Feb 13, 2021

No description provided.

@nodejs-github-bot nodejs-github-bot added the assert Issues and PRs related to the assert subsystem. label Feb 13, 2021
@aduh95 aduh95 added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Feb 13, 2021
@nodejs-github-bot

This comment has been minimized.

@RaisinTen

This comment has been minimized.

@RaisinTen RaisinTen removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Feb 13, 2021
@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Feb 13, 2021

@nodejs-github-bot
Copy link
Collaborator

@aduh95
Copy link
Contributor Author

aduh95 commented Feb 13, 2021

Benchmark CI showed a few improvements and no significant perf regressions:

                                                                                                                       confidence improvement accuracy (*)    (**)   (***)
assert/deepequal-typedarrays.jslen=5000 method='notDeepEqual' strict=0 n=500 type='Uint8Array'                                 **      8.39 %       ±6.01%  ±8.02% ±10.50%
assert/deepequal-typedarrays.jslen=5000 method='notDeepEqual' strict=1 n=500 type='Float64Array'                              ***     10.21 %       ±5.23%  ±7.00%  ±9.20%
                                                                                                                       confidence improvement accuracy (*)    (**)   (***)
assert/deepequal-buffer.jsmethod='deepEqual' strict=0 len=1000 n=20000                                                                 2.01 %       ±4.69%  ±6.25%  ±8.13%
assert/deepequal-buffer.jsmethod='deepEqual' strict=0 len=100 n=20000                                                                 -2.39 %       ±4.61%  ±6.14%  ±8.02%
assert/deepequal-buffer.jsmethod='deepEqual' strict=1 len=1000 n=20000                                                                -0.84 %       ±4.67%  ±6.23%  ±8.16%
assert/deepequal-buffer.jsmethod='deepEqual' strict=1 len=100 n=20000                                                                 -1.85 %       ±5.91%  ±7.86% ±10.23%
assert/deepequal-buffer.jsmethod='notDeepEqual' strict=0 len=1000 n=20000                                                             -1.38 %       ±4.31%  ±5.76%  ±7.55%
assert/deepequal-buffer.jsmethod='notDeepEqual' strict=0 len=100 n=20000                                                              -0.24 %       ±6.14%  ±8.17% ±10.64%
assert/deepequal-buffer.jsmethod='notDeepEqual' strict=1 len=1000 n=20000                                                             -3.15 %       ±5.91%  ±7.87% ±10.27%
assert/deepequal-buffer.jsmethod='notDeepEqual' strict=1 len=100 n=20000                                                              -1.91 %       ±5.59%  ±7.44%  ±9.71%
assert/deepequal-map.jsmethod='deepEqual_mixed' strict=0 len=500 n=500                                                                 2.30 %       ±4.88%  ±6.56%  ±8.68%
assert/deepequal-map.jsmethod='deepEqual_mixed' strict=1 len=500 n=500                                                                -1.63 %       ±1.64%  ±2.18%  ±2.84%
assert/deepequal-map.jsmethod='deepEqual_objectOnly' strict=0 len=500 n=500                                                            1.90 %       ±3.28%  ±4.39%  ±5.78%
assert/deepequal-map.jsmethod='deepEqual_objectOnly' strict=1 len=500 n=500                                                            0.18 %       ±1.51%  ±2.01%  ±2.61%
assert/deepequal-map.jsmethod='deepEqual_primitiveOnly' strict=0 len=500 n=500                                                         4.14 %       ±4.96%  ±6.63%  ±8.68%
assert/deepequal-map.jsmethod='deepEqual_primitiveOnly' strict=1 len=500 n=500                                                        -1.35 %       ±6.23%  ±8.30% ±10.85%
assert/deepequal-map.jsmethod='notDeepEqual_mixed' strict=0 len=500 n=500                                                              1.36 %       ±3.93%  ±5.24%  ±6.82%
assert/deepequal-map.jsmethod='notDeepEqual_mixed' strict=1 len=500 n=500                                                              2.99 %       ±4.40%  ±5.86%  ±7.64%
assert/deepequal-map.jsmethod='notDeepEqual_objectOnly' strict=0 len=500 n=500                                                        -1.29 %       ±2.09%  ±2.79%  ±3.63%
assert/deepequal-map.jsmethod='notDeepEqual_objectOnly' strict=1 len=500 n=500                                                         0.10 %       ±2.04%  ±2.71%  ±3.53%
assert/deepequal-map.jsmethod='notDeepEqual_primitiveOnly' strict=0 len=500 n=500                                                      0.02 %       ±4.37%  ±5.82%  ±7.57%
assert/deepequal-map.jsmethod='notDeepEqual_primitiveOnly' strict=1 len=500 n=500                                                      3.10 %       ±3.30%  ±4.39%  ±5.72%
assert/deepequal-object.jsmethod='deepEqual' strict=0 size=1000 n=5000                                                                 3.21 %       ±6.40%  ±8.53% ±11.10%
assert/deepequal-object.jsmethod='deepEqual' strict=0 size=100 n=5000                                                                  3.24 %       ±4.97%  ±6.62%  ±8.63%
assert/deepequal-object.jsmethod='deepEqual' strict=0 size=50000 n=5000                                                                0.08 %       ±0.77%  ±1.03%  ±1.34%
assert/deepequal-object.jsmethod='deepEqual' strict=1 size=1000 n=5000                                                                -0.61 %       ±4.50%  ±6.00%  ±7.81%
assert/deepequal-object.jsmethod='deepEqual' strict=1 size=100 n=5000                                                                  3.51 %       ±5.14%  ±6.88%  ±9.04%
assert/deepequal-object.jsmethod='deepEqual' strict=1 size=50000 n=5000                                                                0.95 %       ±1.10%  ±1.48%  ±1.95%
assert/deepequal-object.jsmethod='notDeepEqual' strict=0 size=1000 n=5000                                                              1.83 %       ±7.77% ±10.34% ±13.46%
assert/deepequal-object.jsmethod='notDeepEqual' strict=0 size=100 n=5000                                                               3.62 %       ±7.63% ±10.17% ±13.29%
assert/deepequal-object.jsmethod='notDeepEqual' strict=0 size=50000 n=5000                                                             3.21 %       ±3.59%  ±4.78%  ±6.24%
assert/deepequal-object.jsmethod='notDeepEqual' strict=1 size=1000 n=5000                                                              3.62 %       ±9.55% ±12.76% ±16.70%
assert/deepequal-object.jsmethod='notDeepEqual' strict=1 size=100 n=5000                                                               5.85 %       ±7.59% ±10.12% ±13.21%
assert/deepequal-object.jsmethod='notDeepEqual' strict=1 size=50000 n=5000                                                            -1.09 %       ±2.88%  ±3.83%  ±4.98%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='deepEqual_Array' strict=0 len=20000 n=25 primitive='array'                     2.80 %       ±5.25%  ±6.99%  ±9.11%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='deepEqual_Array' strict=0 len=20000 n=25 primitive='number'                   -1.81 %       ±4.27%  ±5.69%  ±7.40%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='deepEqual_Array' strict=0 len=20000 n=25 primitive='object'             *     -4.98 %       ±4.75%  ±6.33%  ±8.28%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='deepEqual_Array' strict=0 len=20000 n=25 primitive='string'                    4.04 %       ±4.98%  ±6.63%  ±8.66%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='deepEqual_Array' strict=1 len=20000 n=25 primitive='array'                     0.22 %       ±4.05%  ±5.38%  ±7.01%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='deepEqual_Array' strict=1 len=20000 n=25 primitive='number'                    2.34 %       ±3.35%  ±4.46%  ±5.80%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='deepEqual_Array' strict=1 len=20000 n=25 primitive='object'                    3.82 %       ±4.99%  ±6.65%  ±8.66%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='deepEqual_Array' strict=1 len=20000 n=25 primitive='string'                   -0.13 %       ±5.50%  ±7.32%  ±9.53%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='deepEqual_Set' strict=0 len=20000 n=25 primitive='array'                      -0.76 %       ±4.97%  ±6.61%  ±8.60%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='deepEqual_Set' strict=0 len=20000 n=25 primitive='number'                     -1.62 %       ±7.03%  ±9.37% ±12.22%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='deepEqual_Set' strict=0 len=20000 n=25 primitive='object'                     -1.25 %       ±6.77%  ±9.04% ±11.82%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='deepEqual_Set' strict=0 len=20000 n=25 primitive='string'                      7.33 %       ±7.86% ±10.47% ±13.64%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='deepEqual_Set' strict=1 len=20000 n=25 primitive='array'                      -1.08 %       ±6.87%  ±9.14% ±11.90%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='deepEqual_Set' strict=1 len=20000 n=25 primitive='number'                     -0.51 %       ±5.11%  ±6.81%  ±8.87%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='deepEqual_Set' strict=1 len=20000 n=25 primitive='object'                     -0.27 %       ±5.62%  ±7.48%  ±9.74%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='deepEqual_Set' strict=1 len=20000 n=25 primitive='string'                     -5.04 %       ±8.18% ±10.91% ±14.25%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='notDeepEqual_Array' strict=0 len=20000 n=25 primitive='array'                  0.40 %       ±5.56%  ±7.39%  ±9.62%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='notDeepEqual_Array' strict=0 len=20000 n=25 primitive='number'                -3.17 %       ±4.79%  ±6.39%  ±8.36%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='notDeepEqual_Array' strict=0 len=20000 n=25 primitive='object'                -0.00 %       ±4.20%  ±5.59%  ±7.28%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='notDeepEqual_Array' strict=0 len=20000 n=25 primitive='string'                -2.02 %       ±4.16%  ±5.54%  ±7.22%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='notDeepEqual_Array' strict=1 len=20000 n=25 primitive='array'                 -1.79 %       ±4.14%  ±5.51%  ±7.18%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='notDeepEqual_Array' strict=1 len=20000 n=25 primitive='number'                -3.07 %       ±4.14%  ±5.52%  ±7.23%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='notDeepEqual_Array' strict=1 len=20000 n=25 primitive='object'                -0.92 %       ±5.63%  ±7.50%  ±9.76%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='notDeepEqual_Array' strict=1 len=20000 n=25 primitive='string'                -2.80 %       ±5.07%  ±6.76%  ±8.81%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='notDeepEqual_Set' strict=0 len=20000 n=25 primitive='array'                    2.14 %       ±6.32%  ±8.42% ±10.96%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='notDeepEqual_Set' strict=0 len=20000 n=25 primitive='number'                   3.40 %       ±5.86%  ±7.79% ±10.14%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='notDeepEqual_Set' strict=0 len=20000 n=25 primitive='object'                   2.69 %       ±6.23%  ±8.30% ±10.82%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='notDeepEqual_Set' strict=0 len=20000 n=25 primitive='string'                   0.88 %       ±5.46%  ±7.27%  ±9.46%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='notDeepEqual_Set' strict=1 len=20000 n=25 primitive='array'                   -0.22 %       ±8.10% ±10.78% ±14.03%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='notDeepEqual_Set' strict=1 len=20000 n=25 primitive='number'                   0.53 %       ±6.69%  ±8.91% ±11.60%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='notDeepEqual_Set' strict=1 len=20000 n=25 primitive='object'                   2.49 %       ±5.77%  ±7.70% ±10.05%
assert/deepequal-prims-and-objs-big-array-set.jsmethod='notDeepEqual_Set' strict=1 len=20000 n=25 primitive='string'                   1.62 %       ±6.73%  ±8.96% ±11.67%
assert/deepequal-prims-and-objs-big-loop.jsmethod='deepEqual' strict=0 n=20000 primitive='array'                                       0.50 %       ±4.52%  ±6.02%  ±7.84%
assert/deepequal-prims-and-objs-big-loop.jsmethod='deepEqual' strict=0 n=20000 primitive='number'                                     -3.31 %       ±4.42%  ±5.89%  ±7.70%
assert/deepequal-prims-and-objs-big-loop.jsmethod='deepEqual' strict=0 n=20000 primitive='object'                                     -3.02 %       ±5.00%  ±6.66%  ±8.67%
assert/deepequal-prims-and-objs-big-loop.jsmethod='deepEqual' strict=0 n=20000 primitive='string'                                     -0.97 %       ±5.09%  ±6.77%  ±8.81%
assert/deepequal-prims-and-objs-big-loop.jsmethod='deepEqual' strict=1 n=20000 primitive='array'                                       0.23 %       ±5.19%  ±6.90%  ±8.98%
assert/deepequal-prims-and-objs-big-loop.jsmethod='deepEqual' strict=1 n=20000 primitive='number'                                     -0.18 %       ±5.02%  ±6.70%  ±8.75%
assert/deepequal-prims-and-objs-big-loop.jsmethod='deepEqual' strict=1 n=20000 primitive='object'                                     -3.65 %       ±4.49%  ±5.98%  ±7.79%
assert/deepequal-prims-and-objs-big-loop.jsmethod='deepEqual' strict=1 n=20000 primitive='string'                                      3.19 %       ±5.07%  ±6.75%  ±8.80%
assert/deepequal-prims-and-objs-big-loop.jsmethod='notDeepEqual' strict=0 n=20000 primitive='array'                                    0.33 %       ±5.12%  ±6.82%  ±8.90%
assert/deepequal-prims-and-objs-big-loop.jsmethod='notDeepEqual' strict=0 n=20000 primitive='number'                                   2.67 %       ±4.26%  ±5.68%  ±7.39%
assert/deepequal-prims-and-objs-big-loop.jsmethod='notDeepEqual' strict=0 n=20000 primitive='object'                                  -2.69 %       ±4.24%  ±5.65%  ±7.35%
assert/deepequal-prims-and-objs-big-loop.jsmethod='notDeepEqual' strict=0 n=20000 primitive='string'                                  -1.76 %       ±4.63%  ±6.16%  ±8.02%
assert/deepequal-prims-and-objs-big-loop.jsmethod='notDeepEqual' strict=1 n=20000 primitive='array'                                    1.22 %       ±4.57%  ±6.08%  ±7.93%
assert/deepequal-prims-and-objs-big-loop.jsmethod='notDeepEqual' strict=1 n=20000 primitive='number'                                  -5.23 %       ±5.76%  ±7.67%  ±9.99%
assert/deepequal-prims-and-objs-big-loop.jsmethod='notDeepEqual' strict=1 n=20000 primitive='object'                                   0.75 %       ±4.79%  ±6.37%  ±8.30%
assert/deepequal-prims-and-objs-big-loop.jsmethod='notDeepEqual' strict=1 n=20000 primitive='string'                                  -4.17 %       ±5.86%  ±7.80% ±10.15%
assert/deepequal-set.jsmethod='deepEqual_mixed' strict=0 len=500 n=500                                                                 1.64 %       ±1.74%  ±2.32%  ±3.03%
assert/deepequal-set.jsmethod='deepEqual_mixed' strict=1 len=500 n=500                                                                -2.48 %       ±5.16%  ±6.93%  ±9.18%
assert/deepequal-set.jsmethod='deepEqual_objectOnly' strict=0 len=500 n=500                                                     *      1.43 %       ±1.20%  ±1.59%  ±2.08%
assert/deepequal-set.jsmethod='deepEqual_objectOnly' strict=1 len=500 n=500                                                           -0.81 %       ±1.85%  ±2.46%  ±3.21%
assert/deepequal-set.jsmethod='deepEqual_primitiveOnly' strict=0 len=500 n=500                                                         4.08 %       ±5.15%  ±6.86%  ±8.93%
assert/deepequal-set.jsmethod='deepEqual_primitiveOnly' strict=1 len=500 n=500                                                        -0.57 %       ±5.25%  ±6.99%  ±9.10%
assert/deepequal-set.jsmethod='notDeepEqual_mixed' strict=0 len=500 n=500                                                             -0.91 %       ±3.67%  ±4.88%  ±6.36%
assert/deepequal-set.jsmethod='notDeepEqual_mixed' strict=1 len=500 n=500                                                             -1.63 %       ±3.70%  ±4.92%  ±6.41%
assert/deepequal-set.jsmethod='notDeepEqual_objectOnly' strict=0 len=500 n=500                                                         1.12 %       ±1.92%  ±2.56%  ±3.33%
assert/deepequal-set.jsmethod='notDeepEqual_objectOnly' strict=1 len=500 n=500                                                         0.34 %       ±2.31%  ±3.07%  ±4.00%
assert/deepequal-set.jsmethod='notDeepEqual_primitiveOnly' strict=0 len=500 n=500                                                     -0.90 %       ±2.99%  ±3.98%  ±5.19%
assert/deepequal-set.jsmethod='notDeepEqual_primitiveOnly' strict=1 len=500 n=500                                                     -1.80 %       ±4.12%  ±5.49%  ±7.15%
assert/deepequal-typedarrays.jslen=100 method='deepEqual' strict=0 n=500 type='Float32Array'                                           1.69 %       ±9.61% ±12.78% ±16.64%
assert/deepequal-typedarrays.jslen=100 method='deepEqual' strict=0 n=500 type='Float64Array'                                           3.08 %       ±4.79%  ±6.37%  ±8.29%
assert/deepequal-typedarrays.jslen=100 method='deepEqual' strict=0 n=500 type='Int8Array'                                              1.05 %       ±4.96%  ±6.61%  ±8.61%
assert/deepequal-typedarrays.jslen=100 method='deepEqual' strict=0 n=500 type='Uint8Array'                                            -5.46 %       ±6.14%  ±8.17% ±10.64%
assert/deepequal-typedarrays.jslen=100 method='deepEqual' strict=0 n=500 type='Uint8ClampedArray'                                      0.27 %       ±5.38%  ±7.16%  ±9.32%
assert/deepequal-typedarrays.jslen=100 method='deepEqual' strict=1 n=500 type='Float32Array'                                          -4.10 %       ±5.05%  ±6.73%  ±8.80%
assert/deepequal-typedarrays.jslen=100 method='deepEqual' strict=1 n=500 type='Float64Array'                                           4.75 %       ±6.88%  ±9.15% ±11.93%
assert/deepequal-typedarrays.jslen=100 method='deepEqual' strict=1 n=500 type='Int8Array'                                             -1.76 %      ±10.63% ±14.22% ±18.66%
assert/deepequal-typedarrays.jslen=100 method='deepEqual' strict=1 n=500 type='Uint8Array'                                      *      5.12 %       ±4.38%  ±5.84%  ±7.60%
assert/deepequal-typedarrays.jslen=100 method='deepEqual' strict=1 n=500 type='Uint8ClampedArray'                                     -1.17 %       ±4.77%  ±6.35%  ±8.28%
assert/deepequal-typedarrays.jslen=100 method='notDeepEqual' strict=0 n=500 type='Float32Array'                                       -2.81 %       ±3.99%  ±5.31%  ±6.92%
assert/deepequal-typedarrays.jslen=100 method='notDeepEqual' strict=0 n=500 type='Float64Array'                                       -0.47 %       ±4.12%  ±5.49%  ±7.15%
assert/deepequal-typedarrays.jslen=100 method='notDeepEqual' strict=0 n=500 type='Int8Array'                                           0.94 %       ±6.54%  ±8.70% ±11.33%
assert/deepequal-typedarrays.jslen=100 method='notDeepEqual' strict=0 n=500 type='Uint8Array'                                         -2.44 %       ±4.82%  ±6.41%  ±8.35%
assert/deepequal-typedarrays.jslen=100 method='notDeepEqual' strict=0 n=500 type='Uint8ClampedArray'                                  -1.13 %       ±4.62%  ±6.14%  ±8.00%
assert/deepequal-typedarrays.jslen=100 method='notDeepEqual' strict=1 n=500 type='Float32Array'                                       -2.11 %       ±6.48%  ±8.65% ±11.33%
assert/deepequal-typedarrays.jslen=100 method='notDeepEqual' strict=1 n=500 type='Float64Array'                                       -0.47 %       ±5.80%  ±7.71% ±10.04%
assert/deepequal-typedarrays.jslen=100 method='notDeepEqual' strict=1 n=500 type='Int8Array'                                           0.99 %       ±5.35%  ±7.12%  ±9.27%
assert/deepequal-typedarrays.jslen=100 method='notDeepEqual' strict=1 n=500 type='Uint8Array'                                          0.59 %       ±5.68%  ±7.58%  ±9.92%
assert/deepequal-typedarrays.jslen=100 method='notDeepEqual' strict=1 n=500 type='Uint8ClampedArray'                                   1.39 %       ±6.06%  ±8.07% ±10.50%
assert/deepequal-typedarrays.jslen=5000 method='deepEqual' strict=0 n=500 type='Float32Array'                                         -1.25 %       ±2.35%  ±3.13%  ±4.08%
assert/deepequal-typedarrays.jslen=5000 method='deepEqual' strict=0 n=500 type='Float64Array'                                         -0.25 %       ±1.56%  ±2.07%  ±2.70%
assert/deepequal-typedarrays.jslen=5000 method='deepEqual' strict=0 n=500 type='Int8Array'                                            -1.73 %       ±4.24%  ±5.65%  ±7.36%
assert/deepequal-typedarrays.jslen=5000 method='deepEqual' strict=0 n=500 type='Uint8Array'                                            3.02 %       ±5.62%  ±7.50%  ±9.82%
assert/deepequal-typedarrays.jslen=5000 method='deepEqual' strict=0 n=500 type='Uint8ClampedArray'                                    -0.55 %       ±4.58%  ±6.10%  ±7.94%
assert/deepequal-typedarrays.jslen=5000 method='deepEqual' strict=1 n=500 type='Float32Array'                                         -1.43 %       ±5.60%  ±7.47%  ±9.74%
assert/deepequal-typedarrays.jslen=5000 method='deepEqual' strict=1 n=500 type='Float64Array'                                         -2.86 %       ±5.43%  ±7.22%  ±9.40%
assert/deepequal-typedarrays.jslen=5000 method='deepEqual' strict=1 n=500 type='Int8Array'                                            -0.05 %       ±5.19%  ±6.91%  ±8.99%
assert/deepequal-typedarrays.jslen=5000 method='deepEqual' strict=1 n=500 type='Uint8Array'                                           -0.15 %       ±4.75%  ±6.31%  ±8.22%
assert/deepequal-typedarrays.jslen=5000 method='deepEqual' strict=1 n=500 type='Uint8ClampedArray'                                     1.63 %       ±5.15%  ±6.85%  ±8.93%
assert/deepequal-typedarrays.jslen=5000 method='notDeepEqual' strict=0 n=500 type='Float32Array'                                      -2.72 %       ±4.53%  ±6.04%  ±7.88%
assert/deepequal-typedarrays.jslen=5000 method='notDeepEqual' strict=0 n=500 type='Float64Array'                                      -0.92 %       ±4.84%  ±6.44%  ±8.38%
assert/deepequal-typedarrays.jslen=5000 method='notDeepEqual' strict=0 n=500 type='Int8Array'                                         -2.74 %       ±6.18%  ±8.24% ±10.77%
assert/deepequal-typedarrays.jslen=5000 method='notDeepEqual' strict=0 n=500 type='Uint8Array'                                 **      8.39 %       ±6.01%  ±8.02% ±10.50%
assert/deepequal-typedarrays.jslen=5000 method='notDeepEqual' strict=0 n=500 type='Uint8ClampedArray'                                  1.38 %       ±5.73%  ±7.63%  ±9.94%
assert/deepequal-typedarrays.jslen=5000 method='notDeepEqual' strict=1 n=500 type='Float32Array'                                      -2.25 %       ±5.30%  ±7.06%  ±9.20%
assert/deepequal-typedarrays.jslen=5000 method='notDeepEqual' strict=1 n=500 type='Float64Array'                              ***     10.21 %       ±5.23%  ±7.00%  ±9.20%
assert/deepequal-typedarrays.jslen=5000 method='notDeepEqual' strict=1 n=500 type='Int8Array'                                         -0.89 %       ±5.69%  ±7.58%  ±9.86%
assert/deepequal-typedarrays.jslen=5000 method='notDeepEqual' strict=1 n=500 type='Uint8Array'                                        -1.81 %       ±4.53%  ±6.03%  ±7.85%
assert/deepequal-typedarrays.jslen=5000 method='notDeepEqual' strict=1 n=500 type='Uint8ClampedArray'                                 -3.35 %       ±5.36%  ±7.15%  ±9.33%
assert/ok.jsn=100000                                                                                                                   0.31 %       ±7.61% ±10.12% ±13.18%
assert/throws.jsmethod='doesNotThrow' n=10000                                                                                         -1.06 %       ±5.54%  ±7.37%  ±9.60%
assert/throws.jsmethod='throws_RegExp' n=10000                                                                                         2.22 %       ±4.81%  ±6.40%  ±8.33%
assert/throws.jsmethod='throws_TypeError' n=10000                                                                                     -0.74 %       ±5.17%  ±6.89%  ±8.98%

Be aware that when doing many comparisons the risk of a false-positive
result increases. In this case, there are 136 comparisons, you can thus
expect the following amount of false-positive results:
  6.80 false positives, when considering a   5% risk acceptance (*, **, ***),
  1.36 false positives, when considering a   1% risk acceptance (**, ***),
  0.14 false positives, when considering a 0.1% risk acceptance (***)

@aduh95 aduh95 added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Feb 13, 2021
@nodejs-github-bot
Copy link
Collaborator

@@ -313,6 +313,17 @@ function createErrDiff(actual, expected, operator) {
return `${msg}${skipped ? skippedMsg : ''}\n${res}${other}${end}${indicator}`;
}

function addEllipsis(string) {
const lines = StringPrototypeSplit(string, '\n', 11);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aduh95 Thanks for fixing the bug. Why did we add 11 here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only want to keep the first 10 lines, we can give up splitting the string at the 11th line.

@aduh95 aduh95 force-pushed the assertion_error-array-iteration branch from bbde06d to 9a10578 Compare February 22, 2021 11:21
@aduh95
Copy link
Contributor Author

aduh95 commented Feb 22, 2021

Landed in 9a10578

@aduh95 aduh95 merged commit 9a10578 into nodejs:master Feb 22, 2021
@aduh95 aduh95 deleted the assertion_error-array-iteration branch February 22, 2021 11:22
targos pushed a commit that referenced this pull request Feb 28, 2021
targos pushed a commit that referenced this pull request May 27, 2021
targos pushed a commit that referenced this pull request May 30, 2021
targos pushed a commit that referenced this pull request Jun 5, 2021
targos pushed a commit that referenced this pull request Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assert Issues and PRs related to the assert subsystem. author ready PRs that have at least one approval, no pending requests for changes, and a CI started.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants