View Single Post
Old August 1, 2019, 01:25   #312
Derakon's Avatar
Join Date: Dec 2009
Posts: 8,924
Derakon is on a distinguished road
Originally Posted by Pete Mack View Post
Notice that the macro definition requires no subroutine calls at all. It is just a transliteration of existing code idiom into a single location. So there should be no performance hit at all.
It wouldn't surprise me if modern compilers are capable of saying "Ah, you're invoking this simple function here, we can just inline it" and get the same performance as a macro. In any case, the performance hit of invoking a function is miniscule in this day and age.
Derakon is offline   Reply With Quote