8 ms·
That's very surprising, assuming they didn't doctor the results by choosing the workload all too carefully. I would have expected a GPU regex too perform much
by _hl_ 7y ago
That's very surprising, assuming they didn't doctor the results by choosing the workload all too carefully.
I would have expected a GPU regex too perform much worse, given that regex matching is probably very branchy code. Especially since computation is generally way faster than IO.
- kuzehanka 7y agoModern 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.