test/benchmark/skill_resolver_benchmark.rb in trailblazer-operation-0.4.1 vs test/benchmark/skill_resolver_benchmark.rb in trailblazer-operation-0.5.0

- old
+ new

@@ -9,31 +9,30 @@ normal_container = {} 50.times do |i| normal_container["xbla_#{i}"] = i end - Benchmark.ips do |x| - x.report(:merge) { + x.report(:merge) do attrs = normal_container.merge(initialize_hash) - 10.times do |i| + 10.times do |_i| attrs["bla_8"] end - 10.times do |i| + 10.times do |_i| attrs["xbla_1"] end - } + end - x.report(:resolver) { + x.report(:resolver) do attrs = Trailblazer::Skill::Resolver.new(initialize_hash, normal_container) - 10.times do |i| + 10.times do |_i| attrs["bla_8"] end - 10.times do |i| + 10.times do |_i| attrs["xbla_1"] end - } + end end # Warming up -------------------------------------- # merge 3.974k i/100ms # resolver 6.593k i/100ms