util,assert: improve comparison performance by BridgeAR · Pull Request #22258 · nodejs/node
benjamingr
added
the
semver-major
label
BridgeAR
removed
the
semver-major
label
BridgeAR
added
the
author ready
label
This adds a smarter logic to compare object keys (including symbols) and it also skips the object key comparison for (typed) arrays, if possible. Besides that it adds a fast path for empty objects, arrays, sets and maps and fast paths for sets and maps with an unequal size. On top of that a few functions are now safer to call by using uncurryThis and by caching the actual function. Overall, this is a significant performance boost for comparisons.
BridgeAR added a commit to BridgeAR/node that referenced this pull request
This adds a smarter logic to compare object keys (including symbols) and it also skips the object key comparison for (typed) arrays, if possible. Besides that it adds a fast path for empty objects, arrays, sets and maps and fast paths for sets and maps with an unequal size. On top of that a few functions are now safer to call by using uncurryThis and by caching the actual function. Overall, this is a significant performance boost for comparisons. PR-URL: nodejs#22258 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit that referenced this pull request
This adds a smarter logic to compare object keys (including symbols) and it also skips the object key comparison for (typed) arrays, if possible. Besides that it adds a fast path for empty objects, arrays, sets and maps and fast paths for sets and maps with an unequal size. On top of that a few functions are now safer to call by using uncurryThis and by caching the actual function. Overall, this is a significant performance boost for comparisons. PR-URL: #22258 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit that referenced this pull request
This adds a smarter logic to compare object keys (including symbols) and it also skips the object key comparison for (typed) arrays, if possible. Besides that it adds a fast path for empty objects, arrays, sets and maps and fast paths for sets and maps with an unequal size. On top of that a few functions are now safer to call by using uncurryThis and by caching the actual function. Overall, this is a significant performance boost for comparisons. PR-URL: #22258 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This was referenced
BridgeAR
deleted the
improve-comparison-perf
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters