require 'benchmark' class Object def either?(*args) args.include? self end end count = 10000000 Benchmark.bmbm do |x| x.report "includes?" do count.times do [:one, :two].include?(:one) end end x.report "either?" do count.times do :one.either?(:one, :two) end end x.report "compare" do count.times do :one == :one or :one == :two end end end