ka-weihe/fastest-levenshtein

Feature Request: Early termination for closest and distance

Closed this issue · 3 comments

Pflyg commented

A common use case of edit distance is having a threshold to decide what to do with your data. A lot of algorithms can terminate early if that limit is known beforehand. Now I don't feel comfortable changing something about your implementation (because I frankly don't understand it completely), but this could further boost performance in that use case.

I'm aware of this optimization and I will maybe implement it some day.

Is this optimization still considered?
For small max_distance it would significantly improve performance for distance.
And performance boost would be drastic for closest, the larger the array the greater the gain.

If this is considered, is it a matter of time and would you accept contributions?

If I get the time and desire for it, I will certainly implement it. I'm just a bit limited on time these days. Of course I would accept contributions.