News for hackers. Stuff that matters.
Re:When static makes your C code 10 times faster by ericbarrett on Monday July 05, 2021 @12:59AM (#27734755)
The global must be declared without "extern" somewhere or else no memory is allocated for it.

LTO could handle this if you're compiling an executable, but not a library.

Re:When static makes your C code 10 times faster by astrange on Monday July 05, 2021 @04:29AM (#27735730)
> LTO could handle this if you're compiling an executable, but not a library.

That's not the correct distinction, that's why I said default vs hidden visibility.

Libraries typically export more symbols but executables can also export them eg for plugins.