Created
October 21, 2015 12:45
-
-
Save xdougx/18049b33f6059d2df8f5 to your computer and use it in GitHub Desktop.
bench test with array concat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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