inline inserts the code on the call site, saving when creating the stack frame, saving / restoring registers and the call (branch). In other words, using inline (when it works) is similar to writing code for an inline function instead of calling it.
However, inline does not guarantee anything to do, and it depends on the compiler. The compiler will sometimes be inline functions that are not built-in (well, it is probably the linker that does this when connection time optimization is turned on, but it is easy to imagine situations where this can be done at the compiler level - for example, when the built-in function is static).
If you want to force MSVC to perform inline functions, use __forceinline and check the build. There should be no calls - your code should compile for a simple sequence of instructions executed linearly.
Regarding speed: you can really make your code faster with small functions. However, when you inline perform large functions (and "Big" is difficult to determine, you need to run tests to determine what is large and what is not), the size of your code becomes larger. This is because the built-in function code repeats over and over on call sites. In the end, the whole point of calling a function is to save the instruction counter by reusing the same routine from several places in the code.
As code becomes larger, command caches may be overloaded, resulting in slower code execution.
Another point to consider: modern processors are out of order (most desktop processors - for example, Intel Core Duo or i7) have a mechanism (command tracing) for prefetching branches and inline , then at the hardware level. So aggressive inlining does not always make sense.
In your example, you need to see the assembly that your compiler generates. This may be the same for inline and non inline versions. If it is not inline , try __forceinline if you are using MSVC. If the synchronization is the same in both cases, this means that your processor does a good job of prefetching, and the bottleneck during execution is in a different place.