#!/usr/bin/env ruby require 'bundler/setup' require 'honey_format' require 'benchmark/ips' require 'csv' path = ARGV.first || fail(ArgumentError, ' argument must be provided') csv = File.read(path) Benchmark.ips do |x| x.time = 30 x.warmup = 5 x.report('stdlib CSV') { CSV.parse(csv) } x.report('HoneyFormat::CSV') { HoneyFormat::CSV.new(csv).rows } x.compare! end