Try to optimize `Key::encode`
Open
good first issue
help wanted
prio 1
trac 3
- Dominant language
- Rust
- Stars
- 6
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
It might be worthwhile to return something like `Cow` from [`Key::encode`](https://docs.rs/storey/latest/storey/containers/map/key/trait.Key.html#tymethod.encode). Some common cases (`String`?) don't need us to compute a value.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with Key::encode in the linked storey map key trait documentation and inspect how key values, especially String, are currently encoded. Determine which common cases could avoid computing a value and define the API and behavior needed for the optimization; done means the approach is validated without changing key encoding semantics.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- blockchain, performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100