-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
assert,util: improve deep comparison performance #61076
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,util: improve deep comparison performance #61076
Conversation
4f7303b to
641e674
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #61076 +/- ##
=======================================
Coverage 88.53% 88.53%
=======================================
Files 703 703
Lines 208588 208574 -14
Branches 40233 40224 -9
=======================================
+ Hits 184666 184668 +2
+ Misses 15942 15913 -29
- Partials 7980 7993 +13
🚀 New features to boost your workflow:
|
aduh95
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding request for changes so this doesn't land before the --no-js_float16array runtime flag is removed. Alternatively, we could remove it from this PR as this has little to do with performance.
|
@aduh95 I am not following why we have to wait for it to be removed. We definitely ship with the support and removing that won't happen. I think we can absolutely land this as is. |
We ship with both support and lack there of, it's a runtime flag.
I think we can absolutely wait, there's no rush, is there? |
The property comparison of invalid dates regressed when starting to handle invalid dates as being equal.
This is a very small improvement for error creation.
641e674 to
645d056
Compare
|
Landed in 416db75...6157c81 |
PR-URL: #61076 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
The property comparison of invalid dates regressed when starting to handle invalid dates as being equal. PR-URL: #61076 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
This is a very small improvement for error creation. PR-URL: #61076 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
This combines minor performance improvements for edge cases as well as adding more tests for partialDeepStrictEqual, resolving a TODO, and fixing a bug while comparing invalid dates (not taking into account that extra properties might exist).
The performance gain is mostly for objects containing symbols. We do not have benchmarks for these and our current benchmarks will not show much difference.
See commit messages for details.