我從this網站獲取Jaro-Winkler算法的代碼。我需要運行150,000次以獲得差異之間的距離。這需要很長時間,因爲我在Android移動設備上運行。 它可以優化更多嗎? public class Jaro {
/**
* gets the similarity of the two strings using Jaro distance.
*
*
我做了一個工作算法,但運行時間非常可怕。是的,我從一開始就知道它會很糟糕,但不是那麼多。只有200000條記錄,該程序運行超過一個小時。 基本上就是我做的是: for each searchfield in search fields
for each sample in samples
do a q-gram matching
if there are match