Is there a difference in writing macros using types or string interpolation?

Hello! I'm wondering if there any difference between creating macro using types or just string interpolation? Can one way be faster? And what is preferred way to create macro expansion?

There generally isn’t. The string literal will get parsed into a syntax tree.

If there's a performance difference, I expect it doesn't really matter unless you use the macro a very large number of times.

1 Like