News for hackers. Stuff that matters.
Re:Going Faster by Duplicating Code by chii on Tuesday October 10, 2023 @10:38PM (#37840290)
would it have made a difference if the function was static? The compiler would then be able to deduce that it isn't used anywhere else, and thus could do this inline optimization.
Re:Going Faster by Duplicating Code by thesnide on Wednesday October 11, 2023 @02:47PM (#37848616)
Gcc actually totally does that. Even doing it while not static by copy/pasting the function and enabling further optims.

to me modern compilers are like voodoo magic