1
0
mirror of https://github.com/Morantron/tmux-fingers.git synced 2024-06-25 07:27:52 +02:00
tmux-fingers/benchmark.rb
2020-12-27 20:20:00 +01:00

11 lines
265 B
Ruby

$LOAD_PATH.unshift File.expand_path('./lib/', File.dirname(__FILE__))
require 'fingers'
require 'benchmark'
alphabet = 'asdfghjl'.split('')
Benchmark.bm do |x|
x.report('huffman') { 10_000.times { Huffman.new(alphabet: alphabet, n: 100).generate_hints } }
end