Skip to content

perf: reuse allocs in serialization - #52

Merged
SzczurekYT merged 2 commits into
CrabCraftDev:mainfrom
Vonr:perf/reuse-allocs-ser
Jul 14, 2026
Merged

perf: reuse allocs in serialization#52
SzczurekYT merged 2 commits into
CrabCraftDev:mainfrom
Vonr:perf/reuse-allocs-ser

Conversation

@Vonr

@Vonr Vonr commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

main branch version of #50
vs main:

read/complex_player     time:   [12.801 µs 12.988 µs 13.187 µs]
                        thrpt:  [244.45 MiB/s 248.18 MiB/s 251.82 MiB/s]
                 change:
                        time:   [-3.9509% -1.1581% +1.9716%] (p = 0.43 > 0.05)
                        thrpt:  [-1.9335% +1.1717% +4.1134%]
                        No change in performance detected.
Found 10 outliers among 100 measurements (10.00%)
  9 (9.00%) low mild
  1 (1.00%) high mild

read/chunk              time:   [39.183 µs 39.850 µs 40.602 µs]
                        thrpt:  [1.0168 GiB/s 1.0361 GiB/s 1.0537 GiB/s]
                 change:
                        time:   [-2.6364% +1.0505% +4.8395%] (p = 0.57 > 0.05)
                        thrpt:  [-4.6161% -1.0396% +2.7078%]
                        No change in performance detected.
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild

     Running benches/write.rs (target/release/deps/write-c5d68cceaef7608a)
write/complex_player    time:   [4.4602 µs 4.4801 µs 4.4963 µs]
                        thrpt:  [716.91 MiB/s 719.49 MiB/s 722.70 MiB/s]
                 change:
                        time:   [-82.990% -82.743% -82.497%] (p = 0.00 < 0.05)
                        thrpt:  [+471.34% +479.46% +487.88%]
                        Performance has improved.

write/chunk             time:   [20.042 µs 20.266 µs 20.484 µs]
                        thrpt:  [2.0155 GiB/s 2.0372 GiB/s 2.0600 GiB/s]
                 change:
                        time:   [-75.588% -75.030% -74.443%] (p = 0.00 < 0.05)
                        thrpt:  [+291.28% +300.47% +309.64%]
                        Performance has improved.
Found 15 outliers among 100 measurements (15.00%)
  15 (15.00%) low mild

@SzczurekYT SzczurekYT left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All good, I only moved serialize_str_into to utils.rs to match string deserialization being there too

@SzczurekYT
SzczurekYT merged commit f6d6019 into CrabCraftDev:main Jul 14, 2026
1 check passed
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