lib/benchmark_driver/repeater.rb in benchmark_driver-0.15.7 vs lib/benchmark_driver/repeater.rb in benchmark_driver-0.15.8
- old
+ new
@@ -60,17 +60,10 @@
raise "unexpected rest_on_average #{rest_on_average.inspect}"
end
end
def median_result_i(a)
- b = a.dup
- b.sort!
- x = y = nil
- until b.empty? do
- x = b.pop
- y = b.shift
- end
- x || y
+ a.sort[a.size/2]
end
def median_result(values, rest_on_average)
case values.first
when Numeric then