-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve performance of endpoints deduplication (#299)
We use a map as a set to deduplicate endpoints. Before deduplicating, we can calculate the total number of the endpoints in the input and assume that most of those endpoints are unique. Then, we can use that number when initializing the map. That will improve the performance, as it will help to reduce the cost of growing the map to accommodate all the endpoints. The benchmarks are included.
- Loading branch information
Showing
2 changed files
with
160 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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