4 ms·
Modern GPU have no issues with branching.
by kuzehanka 7y ago
Modern GPU have no issues with branching.
- reitzensteinm 7y agoWhat specifically are you referring to? Branching on GPUs has not substantially changed for a decade. If all threads on warp skip a branch, it's free. If one takes it, the rest also pay the penalty and mask out the vector units. What's at play here is that the needle in a haystack search of regex is going to spend almost all its time 0 or 1 deep in the state machine, so the threads skip the branches and the penalty is not large.