How to Keep C++ Binaries Small - Techniques for C++ Optimization - Sandor Dargo - C++ on Sea 2024

How to Keep C++ Binaries Small - Techniques for C++ Optimization - Sandor Dargo - C++ on Sea 2024

1.706 Lượt nghe
How to Keep C++ Binaries Small - Techniques for C++ Optimization - Sandor Dargo - C++ on Sea 2024
https://cpponsea.uk​ --- How to Keep C++ Binaries Small - Techniques for C++ Optimization - Sandor Dargo - C++ on Sea 2024 --- We talk a lot about run-time performance, sometimes about compile-time performance, but we rarely talk about binary sizes. Even though it matters a lot both in the embedded and in the mobile world. In this talk, we'll talk about how to keep the binary size small both by coding and compiling/linking differently. First, you'll learn about coding techniques that help keep the binary sizes smaller. You'll learn about how object initialization or the way you write special member functions influence executable size. Then we will delve into dynamic polymorphism. Are virtuals so bad executable sizes? What about templates? Is constexpring everything a silver bullet? While writing code differently has its impacts, their effects are often not as significant as using different compiler and linker flags. You just change a flag in your toolchain, and you might gain more than by all of your previous changes combined. But which flags? You'll learn about many of them at this talk! Finally, you'll learn about the intersection of coding techniques and compiler flags. What if you disable run-time type information? Or exceptions? What are the drawbacks and benefits? How far can we get? By the end of the talk, you'll know way more than the average C++ developer about what your choices are if you want to limit the size of your binary. --- Slides: https://github.com/philsquared/cpponsea2024-slides/blob/main/Presentations/How_to_keep_your_binaries_small.pdf Sponsored by Bloomberg: https://www.bloomberg.com/company/values/tech-at-bloomberg/c-plus-plus/ Sponsored By think-cell: https://www.think-cell.com/cpponsea --- Sandor Dargo Sandor is a passionate software craftsman focusing on reducing the maintenance costs by developing, applying and enforcing clean code standards. His other core activity is knowledge sharing both oral and written, within and outside of his employer. When not reading or writing, he spends most of his free time with his two children and his wife baking at home or travelling to new places. --- C++ on Sea is the international C++ conference taking place by the sea, in the UK. Our venue is in Folkestone, Kent, near the entrance to the channel tunnel with stunning views across the English Channel. Annual C++ On Sea Conference - https://www.cpponsea.uk https://www.linkedin.com/company/cpponsea/ https://x.com/cpponsea https://www.facebook.com/profile.php?id=61551121766573 https://www.reddit.com/r/CppOnSea/ https://vmst.io/@cpponsea --- YouTube Videos Filmed, Edited & Optimised by Digital Medium: https://events.digital-medium.co.uk --- #cpp #cplusplus #cplusplusdevelopment #softwaredevelopment #cpponsea