xdougx
10/21/2015 - 12:45 PM

bench test with array concat

bench test with array concat

require "crystal_executer/version"
require "active_support/core_ext/hash"
require "benchmark"

module ModuleBench
  class Runner
    def self.exec path, params = {}
      m1 = Benchmark.bm do |x|  
        x.report("Ruby") do
          a = []
          100_000.times { |i| a << "a"*i }
          puts "\n"
          puts "a.size = #{a.size}"
        end
      end
    end
  end
end