Sha256: 1ca80f6d629b74f452b30ddfe5e84bc4a745c6acc80465f9785c92b3d12d1d9c
Contents?: true
Size: 535 Bytes
Versions: 7
Compression:
Stored size: 535 Bytes
Contents
require 'benchmark' require 'jaro_winkler' require 'fuzzystringmatch' ary = [['al', 'al'], ['martha', 'marhta'], ['jones', 'johnson'], ['abcvwxyz', 'cabvwxyz'], ['dwayne', 'duane'], ['dixon', 'dicksonx'], ['fvie', 'ten']] n = 10000 Benchmark.bmbm do |x| x.report 'jaro_winkler' do n.times{ ary.each{ |str1, str2| JaroWinkler.r_distance(str1, str2) } } end x.report 'fuzzystringmatch' do jarow = FuzzyStringMatch::JaroWinkler.create(:pure) n.times{ ary.each{ |str1, str2| jarow.getDistance(str1, str2) } } end end
Version data entries
7 entries across 7 versions & 1 rubygems