inline and __fastcall directive

Anybody helps me please ! What difference between inline function and _fastcall function. I only know, with inline function, when we call function, the body of this function will replace to function call (at called position). And for __fastcall function, parameters in function will be store in registers and when call function, speed's very fast. If i right understand, which is faster ?
Last edited on
You can't compare the two. __fastcall is a (non-standard) call convention, inlining is the concept of eliminating the call entirely and instead injecting the code at the position the call was made, usually allowing further optimization (and by avoiding the call, avoiding register pollution).
When inlining is possible, it will always be faster, but there are cases where this is not possible or desirable.
Last edited on
Yes, I know they're difference. Just I want to know their speed. Can I ask one question more. I read in some documents, and some tell me, inline function 's always default. Mean, we can use inline keyword or no need. And compiler always use inline for possible inlining function. Right ?
That's correct. The inline keyword has little or no impact on the compiler's inlining decision.
Topic archived. No new replies allowed.