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

benchmark: update iterations of benchmark/assert/deepequal-buffer.js #51415

Closed

Conversation

lucshi
Copy link

@lucshi lucshi commented Jan 10, 2024

Fixes: #50571

Before applying this PR, the top functions are reading test JS file, instead of real logic code of "equal".
After increasing the iteration value, the test case behaved as expected to trigger equal.

Belowing is the benefit after changing the iterations which can reflect real performance and no much overhead for execution time.

<style> </style>
        before PR after PR benefit
assert/deepequal-buffer.js method="deepEqual" arrayBuffer=0 strict=0 1102178.19 811018.53 136%
assert/deepequal-buffer.js method="deepEqual" arrayBuffer=1 strict=0 2126510.614 1449499.9 147%
assert/deepequal-buffer.js method="deepEqual" arrayBuffer=0 strict=1 1076920.796 824504.47 131%
assert/deepequal-buffer.js method="notDeepEqual" arrayBuffer=0 strict=1 1501014.19 1083974.3 138%
assert/deepequal-buffer.js method="unequal_length" arrayBuffer=0 strict=1 2474651.786 1541873.8 160%
assert/deepequal-buffer.js method="deepEqual" arrayBuffer=1 strict=1 1451921.906 1044787.8 139%
assert/deepequal-buffer.js method="notDeepEqual" arrayBuffer=1 strict=1 2085341.463 1421480 147%
assert/deepequal-buffer.js method="unequal_length" arrayBuffer=1 strict=1 2894782.473 1801186.3 161%
assert/deepequal-buffer.js method="deepEqual" arrayBuffer=0 strict=0 1073006.858 804104.05 133%
assert/deepequal-buffer.js method="deepEqual" arrayBuffer=1 strict=0 2067498.834 1391137.1 149%
assert/deepequal-buffer.js method="deepEqual" arrayBuffer=0 strict=1 1068874.391 809949.48 132%
assert/deepequal-buffer.js method="notDeepEqual" arrayBuffer=0 strict=1 1495734.765 1071242.3 140%
assert/deepequal-buffer.js method="unequal_length" arrayBuffer=0 strict=1 2474115.678 1539677.9 161%
assert/deepequal-buffer.js method="deepEqual" arrayBuffer=1 strict=1 1419495.005 1047928.8 135%
assert/deepequal-buffer.js method="notDeepEqual" arrayBuffer=1 strict=1 2054114.939 1394304.8 147%
assert/deepequal-buffer.js method="unequal_length" arrayBuffer=1 strict=1 2905970.911 1776728 164%

@nodejs-github-bot nodejs-github-bot added assert Issues and PRs related to the assert subsystem. benchmark Issues and PRs related to the benchmark subsystem. labels Jan 10, 2024
@lucshi lucshi closed this Mar 1, 2024
@lucshi lucshi deleted the benchmark/assert/deepequal-buffer.js branch March 1, 2024 07:03
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. benchmark Issues and PRs related to the benchmark subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The performance gap between node16 and node21 changes as the n of the benchmark changes
2 participants