Skip to content

Instantly share code, notes, and snippets.

View gaurav-singh1990's full-sized avatar

Gaurav Singh gaurav-singh1990

View GitHub Profile
require 'benchmark/ips'
require 'set'
arr1 = [1,2,3]
arr2 = [1,2,3,4]
s1 = arr1.to_set
s2 = arr2.to_set
Benchmark.ips do |benchmark|