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

perf: Switched to Vec + created benchmarks #24

Merged
merged 2 commits into from
Oct 12, 2024
Merged

Conversation

Norbiros
Copy link
Member

@Norbiros Norbiros commented Oct 9, 2024

This PR makes reading complex_player.dat around 50% faster, which makes our library faster than FastNBT.

@Norbiros Norbiros requested a review from SzczurekYT October 9, 2024 16:43
src/macros.rs Outdated Show resolved Hide resolved
src/nbt/compound.rs Show resolved Hide resolved
src/nbt/compound.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@SzczurekYT SzczurekYT left a comment

Choose a reason for hiding this comment

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

Split this up into two commits, first one to add benchmarks and then second one that does the change, so we can compare the performance difference, and so there is nice history.

benches/read.rs Outdated Show resolved Hide resolved
benches/read.rs Outdated Show resolved Hide resolved
benches/read.rs Show resolved Hide resolved
@Norbiros Norbiros requested a review from SzczurekYT October 12, 2024 09:25
Cargo.toml Outdated Show resolved Hide resolved
src/macros.rs Outdated Show resolved Hide resolved
@Norbiros Norbiros force-pushed the perf/switched-to-vec branch from 63ef1dc to b986d67 Compare October 12, 2024 11:38
@Norbiros Norbiros requested a review from SzczurekYT October 12, 2024 11:38
@Norbiros Norbiros force-pushed the perf/switched-to-vec branch from b986d67 to aac8390 Compare October 12, 2024 11:45
@SzczurekYT
Copy link
Contributor

Alright, extract benchmark addition to separate commit (make it first), and squash everything else into second one, and you can go.

@Norbiros Norbiros force-pushed the perf/switched-to-vec branch 2 times, most recently from e20ce7b to f5be9cf Compare October 12, 2024 13:23
@Norbiros Norbiros merged commit 5c8baf5 into main Oct 12, 2024
2 checks passed
@Norbiros Norbiros deleted the perf/switched-to-vec branch October 12, 2024 13:23
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.

3 participants