I have this piece of code where Shark tells me about this bottleneck:
CGFloat shortestDistance = (distanceA < distanceB) ? distanceA : distanceB;
all of these values are CGFloat. Is there a faster way to find out which one is smaller and assign it to the shortest? Maybe even by reference instead of copying the value? How do I do this and how can I access this later?
btw is code that runs in a very compressed loop. about 60 times per second.
source
share