Sha256: 33ebd9ea92bda2cbbb7e8c55865cf10e49772261a2d1b37e39565606c1b8bb09

Contents?: true

Size: 344 Bytes

Versions: 18

Compression:

Stored size: 344 Bytes

Contents

require 'benchmark/ips'
require 'did_you_mean'
require 'did_you_mean/levenshtein'

STR1, STR2 = "user_signed_in?", "user_logged_in?"

Benchmark.ips do |x|
  x.report "enumerable" do
    DidYouMean::Levenshtein.before_distance STR1, STR2
  end

  x.report "while" do
    DidYouMean::Levenshtein.after_distance STR1, STR2
  end

  x.compare!
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
did_you_mean-1.2.2 benchmark/levenshtein/speed.rb
did_you_mean-1.1.3 benchmark/levenshtein/speed.rb
did_you_mean-1.0.4 benchmark/levenshtein/speed.rb
did_you_mean-1.3.0 benchmark/levenshtein/speed.rb
did_you_mean-1.2.1 benchmark/levenshtein/speed.rb
did_you_mean-1.2.0 benchmark/levenshtein/speed.rb
did_you_mean-1.0.3 benchmark/levenshtein/speed.rb
did_you_mean-1.1.2 benchmark/levenshtein/speed.rb
ruby-compiler-0.1.1 vendor/ruby/gems/did_you_mean-1.1.0/benchmark/levenshtein/speed.rb
did_you_mean-1.1.0 benchmark/levenshtein/speed.rb
did_you_mean-1.0.2 benchmark/levenshtein/speed.rb
did_you_mean-1.0.1 benchmark/levenshtein/speed.rb
did_you_mean-1.0.0 benchmark/levenshtein/speed.rb
did_you_mean-1.0.0.rc1 benchmark/levenshtein/speed.rb
did_you_mean-1.0.0.beta3 benchmark/levenshtein/speed.rb
did_you_mean-1.0.0.beta2 benchmark/levenshtein/speed.rb
did_you_mean-0.10.0-java benchmark/levenshtein/speed.rb
did_you_mean-0.10.0 benchmark/levenshtein/speed.rb