<commit_before>require "benchmark"
require "string_metric"
require "text"

Benchmark.bmbm(7) do |x|
  x.report("Recursive implementation") do
    (1..100).each do |i|
      StringMetric::Levenshtein.distance("kitten", "sitting")
    end
  end

  x.report("Text::Levenshtein implementation") do
    (1..100).each do |i|
      Text::Levenshtein.distance("kitten", "sitting")
    end
  end
end
<commit_msg>Add benchmarks for :full_matrix strategy<commit_after>require "benchmark"
require "string_metric"
require "text"

Benchmark.bmbm(7) do |x|
  x.report("Recursive implementation") do
    (1..100).each do |i|
      StringMetric::Levenshtein.distance("kitten", "sitting", strategy: :recursive)
    end
  end

  x.report("Full Matrix implementation") do
    (1..100).each do |i|
      StringMetric::Levenshtein.distance("kitten", "sitting", strategy: :full_matrix)
    end
  end

  x.report("Text::Levenshtein implementation") do
    (1..100).each do |i|
      Text::Levenshtein.distance("kitten", "sitting")
    end
  end
end

{'fraction_non_alphanumeric': 0.14536585365853658, 'fraction_numerical': 0.021463414634146343, 'mean_word_length': 4.079207920792079, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3593472', 'n_tokens_mistral': 386, 'n_tokens_neox': 356, 'n_words': 79}