Created
February 8, 2022 14:41
-
-
Save gotoAndBliss/c9d57d546d27489941744a28f659ec5d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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