Casting vs branches for performance

Hey team,

Im working on optimizing the parts of my code that run on timers etc and have just been wondering if It is a better idea to replace my casts with branches instead?

I have quite a few line and sphere traces doing different things in a sequence running on a timer every 0.1 seconds. I have been using casts to the main parent BPs to check if the traces are hitting certain items and setting them as variables if the cast is successful. things like landscape, pickup items, trees that can be cut down etc. I was just wondering what the difference in performance would be between casting or doing if statements instead to check if the hit actor is == to my desired actorBP. I cant seem to find a definitive answer as to which is better as most places either claim that casting is the worst or branches are the worst. I usually like to stick with Interfaces for most things but casting seems to be the best fit here.

Thanks in advance
Luke