Optimize away a function call by using an equivalent macro