Boosting your code with Profile-Guided Optimization | Yashvardhan Kukreja | Conf42 Golang 2024

Conference: Conf42 Golang 2024

Year: 2024

Read the abstract ➤ https://www.conf42.com/Golang_2024_Yashvardhan_Kukreja_profileguided_optimization Other sessions at this event ➤ https://www.conf42.com/golang2024 Support our mission ➤ https://www.conf42.com/support Join Discord ➤ https://discord.gg/DnyHgrC7jC Chapters 0:00 intro 0:20 preamble 0:33 whoami 0:59 let's talk about compilation 1:51 the "magic" in compiler magic 3:00 more magic? compiler optimizations! 4:56 some examples 6:09 "inlining" - another interesting optimization 7:58 but what if? 9:32 just have the right amount of inlining 10:31 but compilers don't know a lot 10:46 clearly, compilers need more info! 11:32 feedback-driven optimization (fdo) 11:56 early days of fdo - instrumentation-based 12:48 looks solid on paper, but is it really that good? 13:36 so what do we want? let's talk first principles 13:52 easy enough 14:25 profiling! 14:56 how does it work then? 16:18 enter profile-guided optimization - pgo 16:49 a very simpel server 17:39 but if you notice carefully 18:14 inlining could've been useful here 18:56 let's run and profile the program 19:38 we have all these files now 19:58 now, let's compule with pgo 21:31 let's load test the old and new binaries 22:21 let's compare the performances 23:16 demo 30:06 conclusion 30:39 slied and ssociated content 30:45 references - the real gs 31:01 let's connect 31:07 thanks for your time folks!