It really isn’t, at least not unless you do it in a tight inner loop or for thousands of objects per frame.
And once you’re in C++, casting is much cheaper than in Blueprint, so if it ends up being a real performance bottleneck, you can always convert to C++.
In general, though, you need to know which player controller – if you have multi-player, everything needs to be derived off of some particular player controller instance. Also, the game mode only runs on the “server” or “authority” – again, if you have multiplayer.
If you have single-player, and don’t support split-screen, then “get player controller 0” will always work, and the game instance running will always be authority, so “get game mode” will always work, too. And if you really care, you could cache the cast player controller class inside the “on player join” callback, and similarly cast the game mode inside the “begin play” callback.