Skip to content

Commit

Permalink
util,assert: improve comparison performance
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
  • Loading branch information
BridgeAR authored and targos committed Sep 3, 2018
1 parent cdf6471 commit 4d4180b
Show file tree
Hide file tree
Showing 2 changed files with 205 additions and 118 deletions.
Loading

0 comments on commit 4d4180b

Please sign in to comment.