Skip to content

Instantly share code, notes, and snippets.

View chief's full-sized avatar

Giorgos Tsiftsis chief

View GitHub Profile
@chief
chief / gist:8944843
Created February 11, 2014 21:45
Ruby min Vs sort Vs sort!
#! /usr/bin/env ruby
require "benchmark"
Benchmark.bmbm(7) do |x|
iterations = 10_000
a = 4000.times.map { |i| rand(i * 100).to_i }
x.report("min") do