rapidfuzz / strsim-rs

:abc: Rust implementations of string similarity metrics

Home Page:https://crates.io/crates/strsim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

levensthein in the levensthein crate is faster

vks opened this issue · comments

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.

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!

This should be resolved by #16.