Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve str to Bytes transform performance #221

Merged
merged 2 commits into from
Dec 18, 2024

Conversation

elcharitas
Copy link
Member

@elcharitas elcharitas commented Dec 18, 2024

Key Performance Differences

Aspect to_string() as_bytes()
Memory Usage Allocates new heap memory No additional memory used
Data Copying Copies data from &str to String No data copying
Time Complexity O(n), depends on string size O(1), constant time

@elcharitas elcharitas marked this pull request as ready for review December 18, 2024 10:02
@elcharitas elcharitas merged commit d2198f9 into dev Dec 18, 2024
@elcharitas elcharitas deleted the chore/bytes-transforms-performance branch December 18, 2024 17:54
elcharitas added a commit that referenced this pull request Dec 21, 2024
* chore: update chip_search ngyn version

* chore: lock version to v0.5

* chore: improve str to Bytes transform performance (#221)

* chore: improve str to Bytes transform performance

* update CHANGELOG

* fix: static files dont show up on release binary (#220)

* fix: static files dont show up on release binary

* update CHANGELOG

* fix: implement graceful shutdown on hyper platform (#223)

* feat: implement graceful shutdown

* update changelog

* lint fixes

* improvements

* chore: prep new release v0.5.1 (#224)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant