levensthein in the levensthein crate is faster
vks opened this issue · comments
Vinzent Steinberg commented
I benchmarked levenshtein("kitten", "sitting")
, and those were the results:
test bench_levenshtein ... bench: 201 ns/iter (+/- 10)
test bench_levenshtein2 ... bench: 92 ns/iter (+/- 3)
The first one uses strsim::levenshtein
, the second one use levenshtein::levensthein
.
Danny Guo commented
Yeah, I'm not surprised. There is definitely room for optimization that I haven't gotten around to. I'll try to give it some time in the next few weeks. Thanks for reporting it!