Check out example codes for "rails benchmark". It will help you in understanding the concepts better.

Code Example 1

puts Benchmark.measure {
  50_000.times do
    input.map { |key, value| [key.to_sym, value] }.to_h
  end
}

Learn ReactJs, React Native from akashmittal.com