Implementing the core algorithm in C++ and interfacing with it through [Rcpp](https://www.rcpp.org/) could result in significant performance gains.
Implementing the core algorithm in C++ and interfacing with it through Rcpp could result in significant performance gains.