Optimizing Jaro-Winkler algorithm

前端 未结 6 2010
孤独总比滥情好
孤独总比滥情好 2021-02-05 13:45

I have this code for Jaro-Winkler algorithm taken from this website. I need to run 150,000 times to get distance between differences. It takes a long time, as I run on an Androi

6条回答
  •  北海茫月
    2021-02-05 14:05

    Yes, this can be made a lot faster. For one thing, you don't need the StringBuffers at all. For another, you don't need a separate loop to count transpositions.

    You can find my implementation here, and it should be a lot faster. It's under Apache 2.0 License.

提交回复
热议问题