Skip to content

Instantly share code, notes, and snippets.

@gotoAndBliss
Created February 8, 2022 14:41
Show Gist options
  • Save gotoAndBliss/c9d57d546d27489941744a28f659ec5d to your computer and use it in GitHub Desktop.
Save gotoAndBliss/c9d57d546d27489941744a28f659ec5d to your computer and use it in GitHub Desktop.
require 'csv'
require 'Benchmark'
csv = CSV.open('100k-Records.csv', 'r', headers: true)
csv = CSV.open('5m-Records.csv', 'r', headers: true)
Benchmark.bm do |x|
x.report do
while row = csv.shift
if row['Order ID'] == 423063170
break
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment