Snowiiii / Pumpkin

Empowering everyone to host fast and efficient Minecraft servers.
MIT License
567 stars 25 forks source link

Evaluate using Profile-Guided Optimization (PGO) for the project #11

Open zamazan4ik opened 1 month ago

zamazan4ik commented 1 month ago

Hi! Thank you for investing your time into an efficient Minecraft server implementation!

Since the project cares about performance, I wanted to suggest experimenting with an additional compiler optimization feature - Profile-Guided Optimization (or simply PGO). I collected many benchmarks and other details in my repo - https://github.com/zamazan4ik/awesome-pgo (I hope it could help). In the beginning, with PGO in Rust, I suggest starting with cargo-pgo.

After PGO, more advanced things like Post-Link Optimization (PLO) but I suggest you to integrate PGO before PLO since PGO is a more tested optimization technique. Of course, when the priority for performance will come - because as far as I see, for now there are many more important things to complete here ;)

Thank you!

P.S. Maybe it would be a good idea to open "Discussions" for the repository? In this case, we will be able to segregate actual issues from ideas.

Snowiiii commented 1 month ago

Hey, I actually just looked into Rust compiler optimizations yesterday. I always enable LTO for release builds in my Rust projects as it significantly improves performance and reduces binary size.

I'll definitely check out your repo to see if there are other optimization opportunities. I usually discuss project details in our Discord, but your right may be usefull to have it on github aswell.