FName - Pass by value or pass by reference

I’m just curious about which one is more efficient, performance wise.
I don’t think that using a const reference solve my issue, but thank you for the link, it was really interesting.

For 1) Why Epic is usually passing FName by copy in the engine code instead of using const reference ?

For 2) Using a const ref doesn’t change the sizes of a FName reference. So my comparison with a FName pass by value is still the same.

For 3) Even if you use a const reference there is still an indirection.

1 Like