Benchmarking string manipulations with base R, stringi, and stringr (CC282)
The phylotypr package does a lot of string manipulations using functions from base R. But are these the fastest options? This episode will compare base R string manipulations to those available in the stringi and stringr packages. We’ll look at finding the length of strings, extracting substrings, replacing characters, and translating between character and base4 space. Wait until you see how much faster our code is after implementing the fastest versions of these operations! This episode is part of an ongoing effort to develop an R package that implements the naive Bayesian classifier.
Code
You can browse the state of the repository at the