Optimizing Jaro-Winkler algorithm

前端 未结 6 2013
孤独总比滥情好
孤独总比滥情好 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:18

    Yes, but you aren't going to enjoy it. Replace all those newed StringBuffers with char arrays that are allocated in the constructor and never again, using integer indices to keep track of what's in them.

    This pending Commons-Lang patch will give you some of the flavor.

提交回复
热议问题