Skip to content

Instantly share code, notes, and snippets.

@takkanm
Created February 1, 2018 10:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takkanm/8a62cf54ceff71f71bfabddddf78039b to your computer and use it in GitHub Desktop.
Save takkanm/8a62cf54ceff71f71bfabddddf78039b to your computer and use it in GitHub Desktop.
csv_text = (0..10).map { (?a..?z).to_a.join(',') }.join("\n")
require 'benchmark'
Benchmark.bmbm(10){|x|
x.report("parse csv"){
100.times{
CSV.parse(csv_text)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment