3 ms·
There's also the other 'old-school' method to compile each function into its own object file, I guess that's why MUSL has each function in its own source file:
by flohofwoe 1y ago
There's also the other 'old-school' method to compile each function into its own object file, I guess that's why MUSL has each function in its own source file:
https://github.com/kraj/musl/tree/kraj/master/src/stdio https://github.com/kraj/musl/tree/kraj/master/src/stdio
...but these days -flto is simply the better option to get rid of unused code and data - and enable more optimizations on top. LTO is also exactly why static linking is strictly better than dynamic linking, unless dynamic linking is absolutely required (for instance at the operating system boundary).
- pjmlp 1y agoOr plugins, or hotcode reload techniques, unless people want to go the OS IPC route that seems forgotten to many, while being safer, but naturally more resource demanding.