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

Avoid copying bytes when deserializing strings #4

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

SzczurekYT
Copy link
Contributor

As the title says we now avoid making a copy of string's bytes when deserializing it.

Copy link
Member

@Norbiros Norbiros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't expect that but your code is 8 ns faster than mine!

src/nbt/utils.rs Outdated Show resolved Hide resolved
@SzczurekYT SzczurekYT force-pushed the perf/avoid-copy-for-strings branch from 1e438a0 to 77878f5 Compare March 25, 2024 21:08
@SzczurekYT SzczurekYT requested a review from Norbiros March 25, 2024 21:09
@Norbiros Norbiros merged commit 5bc3363 into CrabCraftDev:main Mar 25, 2024
1 check passed
@SzczurekYT SzczurekYT deleted the perf/avoid-copy-for-strings branch March 25, 2024 21:53
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.

2 participants