madgeekfiend/yenc — pull request #2 by tdobrovolskij (2013-11-08 21:45:53+00:00)
Title: 102% performance gain in encoding methods.

Tested with:
#!/usr/bin/env ruby
require 'benchmark'
load './lib/y_enc.rb'

testa = YEnc.new("/Users/myuser/install/300MB_file","./")
testh = YEnc.new("/Users/myuser/install/300MB_file","./")

Benchmark.bm(7) do |x|
x.report(:arrays) {testa.encode_to_file("testa.yenc")}
x.report(:hashes) {testh.encode_to_file_hash("testh.yenc")}
end

Results:
$ ./test.rb
user system total real
arrays 231.110000 1.310000 232.420000 (233.775491)
hashes 112.950000 1.000000 113.950000 (115.206050)