It’s best to let the compiler decide when to inline a function, except for these scenarios:
- You want to change how many stack frames are in the call stack, for debugging purposes
- You want the comptime-ness of the arguments to propagate to the return value of the function
- Performance measurements demand it. Don’t guess!
Otherwise you actually end up restricting what the compiler is allowed to do when you use inline which can harm binary size, compilation speed, and even runtime performance.