My old production code is long gone but I still have what I used for testinghere. It’s written in Rcpp (C++ with R bindings) and performs fairly well. It does not use sparse matrices (commitpending feature request in base library). We have to rewrite this in scala anyway so that mi...