Skip to content

Instantly share code, notes, and snippets.

@abaldwin88
Created February 20, 2019 01:29
Show Gist options
  • Save abaldwin88/5595d1584d74d5af54e3f35bc60e8d0d to your computer and use it in GitHub Desktop.
Save abaldwin88/5595d1584d74d5af54e3f35bc60e8d0d to your computer and use it in GitHub Desktop.
NUMBER_OF_TRIALS = 100
NUM_OF_CHARS = 43
CHAR_LIST = ('a'..'z').to_a
SEARCH_TERMS = CHAR_LIST.map do |letter|
letter + '?' * (NUM_OF_CHARS - 1)
end
results = Hash.new { |h, k| h[k] = [] }
NUMBER_OF_TRIALS.times do |i|
SEARCH_TERMS.each do |term|
results[term] << benchmark_get(term)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment