Sha256: 543e73294dad198aadfaed9270ccbc6ebdcab9dd349ca8cde8c95d3f35dec842

Contents?: true

Size: 399 Bytes

Versions: 8

Compression:

Stored size: 399 Bytes

Contents

#!/usr/bin/env ruby
require 'bundler/setup'
require 'honey_format'

require 'benchmark/ips'
require 'csv'

path = ARGV.first || fail(ArgumentError, '<path_to_csv> 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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
honey_format-0.11.0 bin/benchmark
honey_format-0.10.0 bin/benchmark
honey_format-0.9.0 bin/benchmark
honey_format-0.8.2 bin/benchmark
honey_format-0.8.1 bin/benchmark
honey_format-0.8.0 bin/benchmark
honey_format-0.7.0 bin/benchmark
honey_format-0.6.0 bin/benchmark