Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ```ruby
- Rehearsal ------------------------------------------
- rubyXL 0.040000 0.010000 0.050000 ( 0.041210)
- creek 0.010000 0.000000 0.010000 ( 0.014644)
- roo 0.020000 0.000000 0.020000 ( 0.022531)
- --------------------------------- total: 0.080000sec
- user system total real
- rubyXL 0.030000 0.000000 0.030000 ( 0.029768)
- creek 0.010000 0.000000 0.010000 ( 0.012902)
- roo 0.020000 0.000000 0.020000 ( 0.015530)
- require 'benchmark'
- require 'rubyXL'
- require 'creek'
- require 'roo'
- file_path = ARGV[0]
- Benchmark.bmbm(6) do |x|
- x.report 'rubyXL' do
- workbook = RubyXL::Parser.parse(file_path)
- worksheet = workbook[0]
- worksheet.each do |row|
- row.cells.each { |c| c }
- end
- end
- x.report 'creek' do |x|
- book = Creek::Book.new(file_path)
- sheet = book.sheets[0]
- sheet.rows.each do |row|
- row.each { |c| c }
- end
- end
- x.report 'roo' do |x|
- book = Roo::Spreadsheet.open(file_path)
- sheet = book.sheet(0)
- sheet.each_row_streaming do |row|
- row.each { |c| c }
- end
- end
- end
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement