Skip to content

Instantly share code, notes, and snippets.

@xdougx
Created October 21, 2015 12:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xdougx/18049b33f6059d2df8f5 to your computer and use it in GitHub Desktop.
Save xdougx/18049b33f6059d2df8f5 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment