Closed msberends closed 1 year ago
Fixes #54.
Perhaps look at stringdist package to implement a faster way for the string comparison in mo_matching_score() (Levenshtein distance). This is why:
stringdist
mo_matching_score()
microbenchmark::microbenchmark(old = utils::adist("E coli", AMR::microorganisms$fullname, useBytes = TRUE), new = stringdist::stringdist("E coli", AMR::microorganisms$fullname, method = "lv", useBytes = TRUE), times = 10) #> Unit: milliseconds #> expr min lq mean median uq max neval cld #> old 118.2304 153.44370 186.49858 162.29776 177.67615 343.22793 10 b #> new 27.1837 27.26855 33.83603 31.49938 37.95392 57.58841 10 a
Five times faster: doing ~6 a second or ~32 a second. That matters!
Replaced with #71
Fixes #54.
Perhaps look at
stringdist
package to implement a faster way for the string comparison inmo_matching_score()
(Levenshtein distance). This is why:Five times faster: doing ~6 a second or ~32 a second. That matters!