Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Selling a company to Microsoft so they can drive it to shit with status updates

Lazaro Herrera WriteCodeEveryday

💭
Selling a company to Microsoft so they can drive it to shit with status updates
View GitHub Profile
View for_vs_each_benchmark.rb
# Copied from https://gist.github.com/jodosha/229951
#!/usr/bin/env ruby -w
require "benchmark"
TIMES = 100_000
ARRAY = (1..1_000).to_a
Benchmark.bm(100) do |b|
b.report "each" do
TIMES.times do |i|