-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
solana-ibc: avoid String allocations and multiple map lookups (#40)
Firstly, use BTreeMap::entry to avoid doing lookups in maps multiple times. With entry method we only need to traverse the map once. Secondly, use `foo.as_str()` rather than `&foo.to_string()` for client and connection ids so we avoid String allocations.
- Loading branch information
Showing
2 changed files
with
19 additions
and
49 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