Not really. First, I don't have much clue about Rcpp. Second, this is Simon's code almost entirely. If he changes it in his package we can immediately see the difference. And thirdly, it is definitely faster than whatever Rcpp version could be added in place. The code is super basic. It comes to simple iteration over characters in string.