Free Functions Don't Change Performance (Much)
16bpp.net·10h·
Discuss: Hacker News, r/cpp
Flag this post

This is a blog post about nothing; at most, wasting puffs of carbon.

Have you heard about “Free Functions” before? In a super-quick nutshell they are any function that is not a member function of a struct or class. We use them all of the time and it’s likely you’ve written some without the intent of doing so.

My first formal introduction to the concept came from Klaus Igelberger’s 2017 talk “Free your Functions!”. If you have not watched it yet, I would recommend taking the time to listen to it. During the presentation, there was a claim made:

Writing code as free functions may be more performant.

But if you watch the talk …

Similar Posts

Loading similar posts...