#!/usr/bin/env ruby from = File.open(ARGV[0]) to = File.open(ARGV[1]) loop do from_line = from.gets to_line = to.gets break if from_line.nil? break if to_line.nil? from_type, from_n_columns, from_n_rows, from_runtime = from_line.split to_type, to_n_columns, to_n_rows, to_runtime = to_line.split break if from_type != to_type break if from_n_columns != to_n_columns break if from_n_rows != to_n_rows runtime_diff = to_runtime.to_f/ from_runtime.to_f puts("%s\t%s\t%s\t%5.2f%%\t%s\t%s" % [ from_type[5..-1], from_n_columns, from_n_rows, runtime_diff * 100, from_runtime, to_runtime, ]) end